diff options
Diffstat (limited to 'include')
35 files changed, 749 insertions, 100 deletions
diff --git a/include/asm-generic/checksum.h b/include/asm-generic/checksum.h index c084767c88bc..59811df58c5b 100644 --- a/include/asm-generic/checksum.h +++ b/include/asm-generic/checksum.h | |||
@@ -38,12 +38,15 @@ extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, | |||
38 | csum_partial_copy((src), (dst), (len), (sum)) | 38 | csum_partial_copy((src), (dst), (len), (sum)) |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifndef ip_fast_csum | ||
41 | /* | 42 | /* |
42 | * This is a version of ip_compute_csum() optimized for IP headers, | 43 | * This is a version of ip_compute_csum() optimized for IP headers, |
43 | * which always checksum on 4 octet boundaries. | 44 | * which always checksum on 4 octet boundaries. |
44 | */ | 45 | */ |
45 | extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); | 46 | extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); |
47 | #endif | ||
46 | 48 | ||
49 | #ifndef csum_fold | ||
47 | /* | 50 | /* |
48 | * Fold a partial checksum | 51 | * Fold a partial checksum |
49 | */ | 52 | */ |
@@ -54,6 +57,7 @@ static inline __sum16 csum_fold(__wsum csum) | |||
54 | sum = (sum & 0xffff) + (sum >> 16); | 57 | sum = (sum & 0xffff) + (sum >> 16); |
55 | return (__force __sum16)~sum; | 58 | return (__force __sum16)~sum; |
56 | } | 59 | } |
60 | #endif | ||
57 | 61 | ||
58 | #ifndef csum_tcpudp_nofold | 62 | #ifndef csum_tcpudp_nofold |
59 | /* | 63 | /* |
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 9788568f7978..c184aa8ec8cd 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h | |||
@@ -7,7 +7,6 @@ | |||
7 | * address space, e.g. all NOMMU machines. | 7 | * address space, e.g. all NOMMU machines. |
8 | */ | 8 | */ |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/mm.h> | ||
11 | #include <linux/string.h> | 10 | #include <linux/string.h> |
12 | 11 | ||
13 | #include <asm/segment.h> | 12 | #include <asm/segment.h> |
@@ -32,7 +31,9 @@ static inline void set_fs(mm_segment_t fs) | |||
32 | } | 31 | } |
33 | #endif | 32 | #endif |
34 | 33 | ||
34 | #ifndef segment_eq | ||
35 | #define segment_eq(a, b) ((a).seg == (b).seg) | 35 | #define segment_eq(a, b) ((a).seg == (b).seg) |
36 | #endif | ||
36 | 37 | ||
37 | #define VERIFY_READ 0 | 38 | #define VERIFY_READ 0 |
38 | #define VERIFY_WRITE 1 | 39 | #define VERIFY_WRITE 1 |
@@ -168,12 +169,18 @@ static inline __must_check long __copy_to_user(void __user *to, | |||
168 | -EFAULT; \ | 169 | -EFAULT; \ |
169 | }) | 170 | }) |
170 | 171 | ||
172 | #ifndef __put_user_fn | ||
173 | |||
171 | static inline int __put_user_fn(size_t size, void __user *ptr, void *x) | 174 | static inline int __put_user_fn(size_t size, void __user *ptr, void *x) |
172 | { | 175 | { |
173 | size = __copy_to_user(ptr, x, size); | 176 | size = __copy_to_user(ptr, x, size); |
174 | return size ? -EFAULT : size; | 177 | return size ? -EFAULT : size; |
175 | } | 178 | } |
176 | 179 | ||
180 | #define __put_user_fn(sz, u, k) __put_user_fn(sz, u, k) | ||
181 | |||
182 | #endif | ||
183 | |||
177 | extern int __put_user_bad(void) __attribute__((noreturn)); | 184 | extern int __put_user_bad(void) __attribute__((noreturn)); |
178 | 185 | ||
179 | #define __get_user(x, ptr) \ | 186 | #define __get_user(x, ptr) \ |
@@ -224,12 +231,17 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
224 | -EFAULT; \ | 231 | -EFAULT; \ |
225 | }) | 232 | }) |
226 | 233 | ||
234 | #ifndef __get_user_fn | ||
227 | static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | 235 | static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) |
228 | { | 236 | { |
229 | size = __copy_from_user(x, ptr, size); | 237 | size = __copy_from_user(x, ptr, size); |
230 | return size ? -EFAULT : size; | 238 | return size ? -EFAULT : size; |
231 | } | 239 | } |
232 | 240 | ||
241 | #define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k) | ||
242 | |||
243 | #endif | ||
244 | |||
233 | extern int __get_user_bad(void) __attribute__((noreturn)); | 245 | extern int __get_user_bad(void) __attribute__((noreturn)); |
234 | 246 | ||
235 | #ifndef __copy_from_user_inatomic | 247 | #ifndef __copy_from_user_inatomic |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index f46cfd73a553..bcbdd7484e58 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -485,14 +485,6 @@ static inline bool acpi_driver_match_device(struct device *dev, | |||
485 | 485 | ||
486 | #endif /* !CONFIG_ACPI */ | 486 | #endif /* !CONFIG_ACPI */ |
487 | 487 | ||
488 | #ifdef CONFIG_ACPI_NUMA | ||
489 | void __init early_parse_srat(void); | ||
490 | #else | ||
491 | static inline void early_parse_srat(void) | ||
492 | { | ||
493 | } | ||
494 | #endif | ||
495 | |||
496 | #ifdef CONFIG_ACPI | 488 | #ifdef CONFIG_ACPI |
497 | void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, | 489 | void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, |
498 | u32 pm1a_ctrl, u32 pm1b_ctrl)); | 490 | u32 pm1a_ctrl, u32 pm1b_ctrl)); |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 1d002b58b60b..8390c474f69a 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -528,6 +528,7 @@ struct bcma_sflash { | |||
528 | u32 size; | 528 | u32 size; |
529 | 529 | ||
530 | struct mtd_info *mtd; | 530 | struct mtd_info *mtd; |
531 | void *priv; | ||
531 | }; | 532 | }; |
532 | #endif | 533 | #endif |
533 | 534 | ||
diff --git a/include/linux/btrfs.h b/include/linux/btrfs.h new file mode 100644 index 000000000000..22d799147db2 --- /dev/null +++ b/include/linux/btrfs.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _LINUX_BTRFS_H | ||
2 | #define _LINUX_BTRFS_H | ||
3 | |||
4 | #include <uapi/linux/btrfs.h> | ||
5 | |||
6 | #endif /* _LINUX_BTRFS_H */ | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index de095b0462a7..76a87fb57ac2 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -359,6 +359,7 @@ asmlinkage ssize_t compat_sys_preadv(unsigned long fd, | |||
359 | asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, | 359 | asmlinkage ssize_t compat_sys_pwritev(unsigned long fd, |
360 | const struct compat_iovec __user *vec, | 360 | const struct compat_iovec __user *vec, |
361 | unsigned long vlen, u32 pos_low, u32 pos_high); | 361 | unsigned long vlen, u32 pos_low, u32 pos_high); |
362 | asmlinkage long comat_sys_lseek(unsigned int, compat_off_t, unsigned int); | ||
362 | 363 | ||
363 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, | 364 | asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, |
364 | const compat_uptr_t __user *envp); | 365 | const compat_uptr_t __user *envp); |
@@ -535,6 +536,8 @@ asmlinkage long compat_sys_openat(int dfd, const char __user *filename, | |||
535 | asmlinkage long compat_sys_open_by_handle_at(int mountdirfd, | 536 | asmlinkage long compat_sys_open_by_handle_at(int mountdirfd, |
536 | struct file_handle __user *handle, | 537 | struct file_handle __user *handle, |
537 | int flags); | 538 | int flags); |
539 | asmlinkage long compat_sys_truncate(const char __user *, compat_off_t); | ||
540 | asmlinkage long compat_sys_ftruncate(unsigned int, compat_ulong_t); | ||
538 | asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp, | 541 | asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp, |
539 | compat_ulong_t __user *outp, | 542 | compat_ulong_t __user *outp, |
540 | compat_ulong_t __user *exp, | 543 | compat_ulong_t __user *exp, |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index bf6afa2fc432..1e483fa7afb4 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -68,8 +68,8 @@ typedef void (*dm_postsuspend_fn) (struct dm_target *ti); | |||
68 | typedef int (*dm_preresume_fn) (struct dm_target *ti); | 68 | typedef int (*dm_preresume_fn) (struct dm_target *ti); |
69 | typedef void (*dm_resume_fn) (struct dm_target *ti); | 69 | typedef void (*dm_resume_fn) (struct dm_target *ti); |
70 | 70 | ||
71 | typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type, | 71 | typedef void (*dm_status_fn) (struct dm_target *ti, status_type_t status_type, |
72 | unsigned status_flags, char *result, unsigned maxlen); | 72 | unsigned status_flags, char *result, unsigned maxlen); |
73 | 73 | ||
74 | typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv); | 74 | typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv); |
75 | 75 | ||
@@ -175,6 +175,14 @@ struct target_type { | |||
175 | #define DM_TARGET_IMMUTABLE 0x00000004 | 175 | #define DM_TARGET_IMMUTABLE 0x00000004 |
176 | #define dm_target_is_immutable(type) ((type)->features & DM_TARGET_IMMUTABLE) | 176 | #define dm_target_is_immutable(type) ((type)->features & DM_TARGET_IMMUTABLE) |
177 | 177 | ||
178 | /* | ||
179 | * Some targets need to be sent the same WRITE bio severals times so | ||
180 | * that they can send copies of it to different devices. This function | ||
181 | * examines any supplied bio and returns the number of copies of it the | ||
182 | * target requires. | ||
183 | */ | ||
184 | typedef unsigned (*dm_num_write_bios_fn) (struct dm_target *ti, struct bio *bio); | ||
185 | |||
178 | struct dm_target { | 186 | struct dm_target { |
179 | struct dm_table *table; | 187 | struct dm_table *table; |
180 | struct target_type *type; | 188 | struct target_type *type; |
@@ -187,26 +195,26 @@ struct dm_target { | |||
187 | uint32_t max_io_len; | 195 | uint32_t max_io_len; |
188 | 196 | ||
189 | /* | 197 | /* |
190 | * A number of zero-length barrier requests that will be submitted | 198 | * A number of zero-length barrier bios that will be submitted |
191 | * to the target for the purpose of flushing cache. | 199 | * to the target for the purpose of flushing cache. |
192 | * | 200 | * |
193 | * The request number can be accessed with dm_bio_get_target_request_nr. | 201 | * The bio number can be accessed with dm_bio_get_target_bio_nr. |
194 | * It is a responsibility of the target driver to remap these requests | 202 | * It is a responsibility of the target driver to remap these bios |
195 | * to the real underlying devices. | 203 | * to the real underlying devices. |
196 | */ | 204 | */ |
197 | unsigned num_flush_requests; | 205 | unsigned num_flush_bios; |
198 | 206 | ||
199 | /* | 207 | /* |
200 | * The number of discard requests that will be submitted to the target. | 208 | * The number of discard bios that will be submitted to the target. |
201 | * The request number can be accessed with dm_bio_get_target_request_nr. | 209 | * The bio number can be accessed with dm_bio_get_target_bio_nr. |
202 | */ | 210 | */ |
203 | unsigned num_discard_requests; | 211 | unsigned num_discard_bios; |
204 | 212 | ||
205 | /* | 213 | /* |
206 | * The number of WRITE SAME requests that will be submitted to the target. | 214 | * The number of WRITE SAME bios that will be submitted to the target. |
207 | * The request number can be accessed with dm_bio_get_target_request_nr. | 215 | * The bio number can be accessed with dm_bio_get_target_bio_nr. |
208 | */ | 216 | */ |
209 | unsigned num_write_same_requests; | 217 | unsigned num_write_same_bios; |
210 | 218 | ||
211 | /* | 219 | /* |
212 | * The minimum number of extra bytes allocated in each bio for the | 220 | * The minimum number of extra bytes allocated in each bio for the |
@@ -214,6 +222,13 @@ struct dm_target { | |||
214 | */ | 222 | */ |
215 | unsigned per_bio_data_size; | 223 | unsigned per_bio_data_size; |
216 | 224 | ||
225 | /* | ||
226 | * If defined, this function is called to find out how many | ||
227 | * duplicate bios should be sent to the target when writing | ||
228 | * data. | ||
229 | */ | ||
230 | dm_num_write_bios_fn num_write_bios; | ||
231 | |||
217 | /* target specific data */ | 232 | /* target specific data */ |
218 | void *private; | 233 | void *private; |
219 | 234 | ||
@@ -233,10 +248,10 @@ struct dm_target { | |||
233 | bool discards_supported:1; | 248 | bool discards_supported:1; |
234 | 249 | ||
235 | /* | 250 | /* |
236 | * Set if the target required discard request to be split | 251 | * Set if the target required discard bios to be split |
237 | * on max_io_len boundary. | 252 | * on max_io_len boundary. |
238 | */ | 253 | */ |
239 | bool split_discard_requests:1; | 254 | bool split_discard_bios:1; |
240 | 255 | ||
241 | /* | 256 | /* |
242 | * Set if this target does not return zeroes on discarded blocks. | 257 | * Set if this target does not return zeroes on discarded blocks. |
@@ -261,7 +276,7 @@ struct dm_target_io { | |||
261 | struct dm_io *io; | 276 | struct dm_io *io; |
262 | struct dm_target *ti; | 277 | struct dm_target *ti; |
263 | union map_info info; | 278 | union map_info info; |
264 | unsigned target_request_nr; | 279 | unsigned target_bio_nr; |
265 | struct bio clone; | 280 | struct bio clone; |
266 | }; | 281 | }; |
267 | 282 | ||
@@ -275,9 +290,9 @@ static inline struct bio *dm_bio_from_per_bio_data(void *data, size_t data_size) | |||
275 | return (struct bio *)((char *)data + data_size + offsetof(struct dm_target_io, clone)); | 290 | return (struct bio *)((char *)data + data_size + offsetof(struct dm_target_io, clone)); |
276 | } | 291 | } |
277 | 292 | ||
278 | static inline unsigned dm_bio_get_target_request_nr(const struct bio *bio) | 293 | static inline unsigned dm_bio_get_target_bio_nr(const struct bio *bio) |
279 | { | 294 | { |
280 | return container_of(bio, struct dm_target_io, clone)->target_request_nr; | 295 | return container_of(bio, struct dm_target_io, clone)->target_bio_nr; |
281 | } | 296 | } |
282 | 297 | ||
283 | int dm_register_target(struct target_type *t); | 298 | int dm_register_target(struct target_type *t); |
diff --git a/include/linux/dm-kcopyd.h b/include/linux/dm-kcopyd.h index 47d9d376e4e7..f486d636b82e 100644 --- a/include/linux/dm-kcopyd.h +++ b/include/linux/dm-kcopyd.h | |||
@@ -21,11 +21,34 @@ | |||
21 | 21 | ||
22 | #define DM_KCOPYD_IGNORE_ERROR 1 | 22 | #define DM_KCOPYD_IGNORE_ERROR 1 |
23 | 23 | ||
24 | struct dm_kcopyd_throttle { | ||
25 | unsigned throttle; | ||
26 | unsigned num_io_jobs; | ||
27 | unsigned io_period; | ||
28 | unsigned total_period; | ||
29 | unsigned last_jiffies; | ||
30 | }; | ||
31 | |||
32 | /* | ||
33 | * kcopyd clients that want to support throttling must pass an initialised | ||
34 | * dm_kcopyd_throttle struct into dm_kcopyd_client_create(). | ||
35 | * Two or more clients may share the same instance of this struct between | ||
36 | * them if they wish to be throttled as a group. | ||
37 | * | ||
38 | * This macro also creates a corresponding module parameter to configure | ||
39 | * the amount of throttling. | ||
40 | */ | ||
41 | #define DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM(name, description) \ | ||
42 | static struct dm_kcopyd_throttle dm_kcopyd_throttle = { 100, 0, 0, 0, 0 }; \ | ||
43 | module_param_named(name, dm_kcopyd_throttle.throttle, uint, 0644); \ | ||
44 | MODULE_PARM_DESC(name, description) | ||
45 | |||
24 | /* | 46 | /* |
25 | * To use kcopyd you must first create a dm_kcopyd_client object. | 47 | * To use kcopyd you must first create a dm_kcopyd_client object. |
48 | * throttle can be NULL if you don't want any throttling. | ||
26 | */ | 49 | */ |
27 | struct dm_kcopyd_client; | 50 | struct dm_kcopyd_client; |
28 | struct dm_kcopyd_client *dm_kcopyd_client_create(void); | 51 | struct dm_kcopyd_client *dm_kcopyd_client_create(struct dm_kcopyd_throttle *throttle); |
29 | void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc); | 52 | void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc); |
30 | 53 | ||
31 | /* | 54 | /* |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index f5939999cb65..91ac8da25020 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -1001,6 +1001,22 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx); | |||
1001 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); | 1001 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); |
1002 | struct dma_chan *net_dma_find_channel(void); | 1002 | struct dma_chan *net_dma_find_channel(void); |
1003 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) | 1003 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) |
1004 | #define dma_request_slave_channel_compat(mask, x, y, dev, name) \ | ||
1005 | __dma_request_slave_channel_compat(&(mask), x, y, dev, name) | ||
1006 | |||
1007 | static inline struct dma_chan | ||
1008 | *__dma_request_slave_channel_compat(dma_cap_mask_t *mask, dma_filter_fn fn, | ||
1009 | void *fn_param, struct device *dev, | ||
1010 | char *name) | ||
1011 | { | ||
1012 | struct dma_chan *chan; | ||
1013 | |||
1014 | chan = dma_request_slave_channel(dev, name); | ||
1015 | if (chan) | ||
1016 | return chan; | ||
1017 | |||
1018 | return __dma_request_channel(mask, fn, fn_param); | ||
1019 | } | ||
1004 | 1020 | ||
1005 | /* --- Helper iov-locking functions --- */ | 1021 | /* --- Helper iov-locking functions --- */ |
1006 | 1022 | ||
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h index 41766de66e33..481ab2345d6b 100644 --- a/include/linux/dw_dmac.h +++ b/include/linux/dw_dmac.h | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | struct dw_dma_slave { | 28 | struct dw_dma_slave { |
29 | struct device *dma_dev; | 29 | struct device *dma_dev; |
30 | const char *bus_id; | ||
31 | u32 cfg_hi; | 30 | u32 cfg_hi; |
32 | u32 cfg_lo; | 31 | u32 cfg_lo; |
33 | u8 src_master; | 32 | u8 src_master; |
@@ -60,9 +59,6 @@ struct dw_dma_platform_data { | |||
60 | unsigned short block_size; | 59 | unsigned short block_size; |
61 | unsigned char nr_masters; | 60 | unsigned char nr_masters; |
62 | unsigned char data_width[4]; | 61 | unsigned char data_width[4]; |
63 | |||
64 | struct dw_dma_slave *sd; | ||
65 | unsigned int sd_count; | ||
66 | }; | 62 | }; |
67 | 63 | ||
68 | /* bursts size */ | 64 | /* bursts size */ |
@@ -114,6 +110,5 @@ void dw_dma_cyclic_stop(struct dma_chan *chan); | |||
114 | dma_addr_t dw_dma_get_src_addr(struct dma_chan *chan); | 110 | dma_addr_t dw_dma_get_src_addr(struct dma_chan *chan); |
115 | 111 | ||
116 | dma_addr_t dw_dma_get_dst_addr(struct dma_chan *chan); | 112 | dma_addr_t dw_dma_get_dst_addr(struct dma_chan *chan); |
117 | bool dw_dma_generic_filter(struct dma_chan *chan, void *param); | ||
118 | 113 | ||
119 | #endif /* DW_DMAC_H */ | 114 | #endif /* DW_DMAC_H */ |
diff --git a/include/linux/hsi/hsi.h b/include/linux/hsi/hsi.h index 56fae865e272..0dca785288cf 100644 --- a/include/linux/hsi/hsi.h +++ b/include/linux/hsi/hsi.h | |||
@@ -121,9 +121,9 @@ static inline int hsi_register_board_info(struct hsi_board_info const *info, | |||
121 | * @device: Driver model representation of the device | 121 | * @device: Driver model representation of the device |
122 | * @tx_cfg: HSI TX configuration | 122 | * @tx_cfg: HSI TX configuration |
123 | * @rx_cfg: HSI RX configuration | 123 | * @rx_cfg: HSI RX configuration |
124 | * @e_handler: Callback for handling port events (RX Wake High/Low) | 124 | * e_handler: Callback for handling port events (RX Wake High/Low) |
125 | * @pclaimed: Keeps tracks if the clients claimed its associated HSI port | 125 | * pclaimed: Keeps tracks if the clients claimed its associated HSI port |
126 | * @nb: Notifier block for port events | 126 | * nb: Notifier block for port events |
127 | */ | 127 | */ |
128 | struct hsi_client { | 128 | struct hsi_client { |
129 | struct device device; | 129 | struct device device; |
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 3e5ecb2d790e..f388203db7e8 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -42,7 +42,6 @@ struct memblock { | |||
42 | 42 | ||
43 | extern struct memblock memblock; | 43 | extern struct memblock memblock; |
44 | extern int memblock_debug; | 44 | extern int memblock_debug; |
45 | extern struct movablemem_map movablemem_map; | ||
46 | 45 | ||
47 | #define memblock_dbg(fmt, ...) \ | 46 | #define memblock_dbg(fmt, ...) \ |
48 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 47 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
@@ -61,7 +60,6 @@ int memblock_reserve(phys_addr_t base, phys_addr_t size); | |||
61 | void memblock_trim_memory(phys_addr_t align); | 60 | void memblock_trim_memory(phys_addr_t align); |
62 | 61 | ||
63 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 62 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
64 | |||
65 | void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, | 63 | void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, |
66 | unsigned long *out_end_pfn, int *out_nid); | 64 | unsigned long *out_end_pfn, int *out_nid); |
67 | 65 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index e7c3f9a0111a..1ede55f292c2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1333,24 +1333,6 @@ extern void free_bootmem_with_active_regions(int nid, | |||
1333 | unsigned long max_low_pfn); | 1333 | unsigned long max_low_pfn); |
1334 | extern void sparse_memory_present_with_active_regions(int nid); | 1334 | extern void sparse_memory_present_with_active_regions(int nid); |
1335 | 1335 | ||
1336 | #define MOVABLEMEM_MAP_MAX MAX_NUMNODES | ||
1337 | struct movablemem_entry { | ||
1338 | unsigned long start_pfn; /* start pfn of memory segment */ | ||
1339 | unsigned long end_pfn; /* end pfn of memory segment (exclusive) */ | ||
1340 | }; | ||
1341 | |||
1342 | struct movablemem_map { | ||
1343 | bool acpi; /* true if using SRAT info */ | ||
1344 | int nr_map; | ||
1345 | struct movablemem_entry map[MOVABLEMEM_MAP_MAX]; | ||
1346 | nodemask_t numa_nodes_hotplug; /* on which nodes we specify memory */ | ||
1347 | nodemask_t numa_nodes_kernel; /* on which nodes kernel resides in */ | ||
1348 | }; | ||
1349 | |||
1350 | extern void __init insert_movablemem_map(unsigned long start_pfn, | ||
1351 | unsigned long end_pfn); | ||
1352 | extern int __init movablemem_map_overlap(unsigned long start_pfn, | ||
1353 | unsigned long end_pfn); | ||
1354 | #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ | 1336 | #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ |
1355 | 1337 | ||
1356 | #if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \ | 1338 | #if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \ |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index f6eb4332ac92..4b02512e421c 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -245,6 +245,7 @@ struct map_info { | |||
245 | unsigned long pfow_base; | 245 | unsigned long pfow_base; |
246 | unsigned long map_priv_1; | 246 | unsigned long map_priv_1; |
247 | unsigned long map_priv_2; | 247 | unsigned long map_priv_2; |
248 | struct device_node *device_node; | ||
248 | void *fldrv_priv; | 249 | void *fldrv_priv; |
249 | struct mtd_chip_driver *fldrv; | 250 | struct mtd_chip_driver *fldrv; |
250 | }; | 251 | }; |
@@ -328,7 +329,7 @@ static inline int map_word_bitsset(struct map_info *map, map_word val1, map_word | |||
328 | 329 | ||
329 | static inline map_word map_word_load(struct map_info *map, const void *ptr) | 330 | static inline map_word map_word_load(struct map_info *map, const void *ptr) |
330 | { | 331 | { |
331 | map_word r = {{0} }; | 332 | map_word r; |
332 | 333 | ||
333 | if (map_bankwidth_is_1(map)) | 334 | if (map_bankwidth_is_1(map)) |
334 | r.x[0] = *(unsigned char *)ptr; | 335 | r.x[0] = *(unsigned char *)ptr; |
@@ -342,6 +343,8 @@ static inline map_word map_word_load(struct map_info *map, const void *ptr) | |||
342 | #endif | 343 | #endif |
343 | else if (map_bankwidth_is_large(map)) | 344 | else if (map_bankwidth_is_large(map)) |
344 | memcpy(r.x, ptr, map->bankwidth); | 345 | memcpy(r.x, ptr, map->bankwidth); |
346 | else | ||
347 | BUG(); | ||
345 | 348 | ||
346 | return r; | 349 | return r; |
347 | } | 350 | } |
@@ -391,7 +394,7 @@ static inline map_word map_word_ff(struct map_info *map) | |||
391 | 394 | ||
392 | static inline map_word inline_map_read(struct map_info *map, unsigned long ofs) | 395 | static inline map_word inline_map_read(struct map_info *map, unsigned long ofs) |
393 | { | 396 | { |
394 | map_word uninitialized_var(r); | 397 | map_word r; |
395 | 398 | ||
396 | if (map_bankwidth_is_1(map)) | 399 | if (map_bankwidth_is_1(map)) |
397 | r.x[0] = __raw_readb(map->virt + ofs); | 400 | r.x[0] = __raw_readb(map->virt + ofs); |
@@ -425,6 +428,8 @@ static inline void inline_map_write(struct map_info *map, const map_word datum, | |||
425 | #endif | 428 | #endif |
426 | else if (map_bankwidth_is_large(map)) | 429 | else if (map_bankwidth_is_large(map)) |
427 | memcpy_toio(map->virt+ofs, datum.x, map->bankwidth); | 430 | memcpy_toio(map->virt+ofs, datum.x, map->bankwidth); |
431 | else | ||
432 | BUG(); | ||
428 | mb(); | 433 | mb(); |
429 | } | 434 | } |
430 | 435 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 13441ddac33d..4b993d358dad 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -233,6 +233,7 @@ struct nfs4_layoutget_args { | |||
233 | struct inode *inode; | 233 | struct inode *inode; |
234 | struct nfs_open_context *ctx; | 234 | struct nfs_open_context *ctx; |
235 | nfs4_stateid stateid; | 235 | nfs4_stateid stateid; |
236 | unsigned long timestamp; | ||
236 | struct nfs4_layoutdriver_data layout; | 237 | struct nfs4_layoutdriver_data layout; |
237 | }; | 238 | }; |
238 | 239 | ||
diff --git a/include/linux/platform_data/elm.h b/include/linux/platform_data/elm.h new file mode 100644 index 000000000000..1bd5244d1dcd --- /dev/null +++ b/include/linux/platform_data/elm.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * BCH Error Location Module | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ELM_H | ||
19 | #define __ELM_H | ||
20 | |||
21 | enum bch_ecc { | ||
22 | BCH4_ECC = 0, | ||
23 | BCH8_ECC, | ||
24 | }; | ||
25 | |||
26 | /* ELM support 8 error syndrome process */ | ||
27 | #define ERROR_VECTOR_MAX 8 | ||
28 | |||
29 | #define BCH8_ECC_OOB_BYTES 13 | ||
30 | #define BCH4_ECC_OOB_BYTES 7 | ||
31 | /* RBL requires 14 byte even though BCH8 uses only 13 byte */ | ||
32 | #define BCH8_SIZE (BCH8_ECC_OOB_BYTES + 1) | ||
33 | /* Uses 1 extra byte to handle erased pages */ | ||
34 | #define BCH4_SIZE (BCH4_ECC_OOB_BYTES + 1) | ||
35 | |||
36 | /** | ||
37 | * struct elm_errorvec - error vector for elm | ||
38 | * @error_reported: set true for vectors error is reported | ||
39 | * @error_uncorrectable: number of uncorrectable errors | ||
40 | * @error_count: number of correctable errors in the sector | ||
41 | * @error_loc: buffer for error location | ||
42 | * | ||
43 | */ | ||
44 | struct elm_errorvec { | ||
45 | bool error_reported; | ||
46 | bool error_uncorrectable; | ||
47 | int error_count; | ||
48 | int error_loc[ERROR_VECTOR_MAX]; | ||
49 | }; | ||
50 | |||
51 | void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, | ||
52 | struct elm_errorvec *err_vec); | ||
53 | void elm_config(struct device *dev, enum bch_ecc bch_type); | ||
54 | #endif /* __ELM_H */ | ||
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 4a4abde000cb..2cf4ffaa3cd4 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -160,6 +160,7 @@ void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | |||
160 | int rpc_protocol(struct rpc_clnt *); | 160 | int rpc_protocol(struct rpc_clnt *); |
161 | struct net * rpc_net_ns(struct rpc_clnt *); | 161 | struct net * rpc_net_ns(struct rpc_clnt *); |
162 | size_t rpc_max_payload(struct rpc_clnt *); | 162 | size_t rpc_max_payload(struct rpc_clnt *); |
163 | unsigned long rpc_get_timeout(struct rpc_clnt *clnt); | ||
163 | void rpc_force_rebind(struct rpc_clnt *); | 164 | void rpc_force_rebind(struct rpc_clnt *); |
164 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | 165 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); |
165 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | 166 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); |
diff --git a/include/scsi/Kbuild b/include/scsi/Kbuild index f2b94918994d..562ff9d591b8 100644 --- a/include/scsi/Kbuild +++ b/include/scsi/Kbuild | |||
@@ -1,4 +1 @@ | |||
1 | header-y += scsi_netlink.h | ||
2 | header-y += scsi_netlink_fc.h | ||
3 | header-y += scsi_bsg_fc.h | ||
4 | header-y += fc/ | header-y += fc/ | |
diff --git a/include/scsi/fc/Kbuild b/include/scsi/fc/Kbuild index 56603813c6cd..e69de29bb2d1 100644 --- a/include/scsi/fc/Kbuild +++ b/include/scsi/fc/Kbuild | |||
@@ -1,4 +0,0 @@ | |||
1 | header-y += fc_els.h | ||
2 | header-y += fc_fs.h | ||
3 | header-y += fc_gs.h | ||
4 | header-y += fc_ns.h | ||
diff --git a/include/scsi/fcoe_sysfs.h b/include/scsi/fcoe_sysfs.h index 604cb9bb3e76..7e2314870341 100644 --- a/include/scsi/fcoe_sysfs.h +++ b/include/scsi/fcoe_sysfs.h | |||
@@ -34,7 +34,8 @@ struct fcoe_sysfs_function_template { | |||
34 | void (*get_fcoe_ctlr_symb_err)(struct fcoe_ctlr_device *); | 34 | void (*get_fcoe_ctlr_symb_err)(struct fcoe_ctlr_device *); |
35 | void (*get_fcoe_ctlr_err_block)(struct fcoe_ctlr_device *); | 35 | void (*get_fcoe_ctlr_err_block)(struct fcoe_ctlr_device *); |
36 | void (*get_fcoe_ctlr_fcs_error)(struct fcoe_ctlr_device *); | 36 | void (*get_fcoe_ctlr_fcs_error)(struct fcoe_ctlr_device *); |
37 | void (*get_fcoe_ctlr_mode)(struct fcoe_ctlr_device *); | 37 | void (*set_fcoe_ctlr_mode)(struct fcoe_ctlr_device *); |
38 | int (*set_fcoe_ctlr_enabled)(struct fcoe_ctlr_device *); | ||
38 | void (*get_fcoe_fcf_selected)(struct fcoe_fcf_device *); | 39 | void (*get_fcoe_fcf_selected)(struct fcoe_fcf_device *); |
39 | void (*get_fcoe_fcf_vlan_id)(struct fcoe_fcf_device *); | 40 | void (*get_fcoe_fcf_vlan_id)(struct fcoe_fcf_device *); |
40 | }; | 41 | }; |
@@ -48,6 +49,12 @@ enum fip_conn_type { | |||
48 | FIP_CONN_TYPE_VN2VN, | 49 | FIP_CONN_TYPE_VN2VN, |
49 | }; | 50 | }; |
50 | 51 | ||
52 | enum ctlr_enabled_state { | ||
53 | FCOE_CTLR_ENABLED, | ||
54 | FCOE_CTLR_DISABLED, | ||
55 | FCOE_CTLR_UNUSED, | ||
56 | }; | ||
57 | |||
51 | struct fcoe_ctlr_device { | 58 | struct fcoe_ctlr_device { |
52 | u32 id; | 59 | u32 id; |
53 | 60 | ||
@@ -64,6 +71,8 @@ struct fcoe_ctlr_device { | |||
64 | int fcf_dev_loss_tmo; | 71 | int fcf_dev_loss_tmo; |
65 | enum fip_conn_type mode; | 72 | enum fip_conn_type mode; |
66 | 73 | ||
74 | enum ctlr_enabled_state enabled; | ||
75 | |||
67 | /* expected in host order for displaying */ | 76 | /* expected in host order for displaying */ |
68 | struct fcoe_fc_els_lesb lesb; | 77 | struct fcoe_fc_els_lesb lesb; |
69 | }; | 78 | }; |
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 8742d853a3b8..4427393115ea 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -260,6 +260,9 @@ void __fcoe_get_lesb(struct fc_lport *lport, struct fc_els_lesb *fc_lesb, | |||
260 | struct net_device *netdev); | 260 | struct net_device *netdev); |
261 | void fcoe_wwn_to_str(u64 wwn, char *buf, int len); | 261 | void fcoe_wwn_to_str(u64 wwn, char *buf, int len); |
262 | int fcoe_validate_vport_create(struct fc_vport *vport); | 262 | int fcoe_validate_vport_create(struct fc_vport *vport); |
263 | int fcoe_link_speed_update(struct fc_lport *); | ||
264 | void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *); | ||
265 | void fcoe_ctlr_get_lesb(struct fcoe_ctlr_device *ctlr_dev); | ||
263 | 266 | ||
264 | /** | 267 | /** |
265 | * is_fip_mode() - returns true if FIP mode selected. | 268 | * is_fip_mode() - returns true if FIP mode selected. |
@@ -289,8 +292,11 @@ static inline bool is_fip_mode(struct fcoe_ctlr *fip) | |||
289 | * @attached: whether this transport is already attached | 292 | * @attached: whether this transport is already attached |
290 | * @list: list linkage to all attached transports | 293 | * @list: list linkage to all attached transports |
291 | * @match: handler to allow the transport driver to match up a given netdev | 294 | * @match: handler to allow the transport driver to match up a given netdev |
295 | * @alloc: handler to allocate per-instance FCoE structures | ||
296 | * (no discovery or login) | ||
292 | * @create: handler to sysfs entry of create for FCoE instances | 297 | * @create: handler to sysfs entry of create for FCoE instances |
293 | * @destroy: handler to sysfs entry of destroy for FCoE instances | 298 | * @destroy: handler to delete per-instance FCoE structures |
299 | * (frees all memory) | ||
294 | * @enable: handler to sysfs entry of enable for FCoE instances | 300 | * @enable: handler to sysfs entry of enable for FCoE instances |
295 | * @disable: handler to sysfs entry of disable for FCoE instances | 301 | * @disable: handler to sysfs entry of disable for FCoE instances |
296 | */ | 302 | */ |
@@ -299,6 +305,7 @@ struct fcoe_transport { | |||
299 | bool attached; | 305 | bool attached; |
300 | struct list_head list; | 306 | struct list_head list; |
301 | bool (*match) (struct net_device *device); | 307 | bool (*match) (struct net_device *device); |
308 | int (*alloc) (struct net_device *device); | ||
302 | int (*create) (struct net_device *device, enum fip_state fip_mode); | 309 | int (*create) (struct net_device *device, enum fip_state fip_mode); |
303 | int (*destroy) (struct net_device *device); | 310 | int (*destroy) (struct net_device *device); |
304 | int (*enable) (struct net_device *device); | 311 | int (*enable) (struct net_device *device); |
@@ -347,7 +354,20 @@ struct fcoe_port { | |||
347 | struct timer_list timer; | 354 | struct timer_list timer; |
348 | struct work_struct destroy_work; | 355 | struct work_struct destroy_work; |
349 | u8 data_src_addr[ETH_ALEN]; | 356 | u8 data_src_addr[ETH_ALEN]; |
357 | struct net_device * (*get_netdev)(const struct fc_lport *lport); | ||
350 | }; | 358 | }; |
359 | |||
360 | /** | ||
361 | * fcoe_get_netdev() - Return the net device associated with a local port | ||
362 | * @lport: The local port to get the net device from | ||
363 | */ | ||
364 | static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport) | ||
365 | { | ||
366 | struct fcoe_port *port = ((struct fcoe_port *)lport_priv(lport)); | ||
367 | |||
368 | return (port->get_netdev) ? port->get_netdev(lport) : NULL; | ||
369 | } | ||
370 | |||
351 | void fcoe_clean_pending_queue(struct fc_lport *); | 371 | void fcoe_clean_pending_queue(struct fc_lport *); |
352 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); | 372 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); |
353 | void fcoe_queue_timer(ulong lport); | 373 | void fcoe_queue_timer(ulong lport); |
@@ -356,7 +376,7 @@ int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen, | |||
356 | 376 | ||
357 | /* FCoE Sysfs helpers */ | 377 | /* FCoE Sysfs helpers */ |
358 | void fcoe_fcf_get_selected(struct fcoe_fcf_device *); | 378 | void fcoe_fcf_get_selected(struct fcoe_fcf_device *); |
359 | void fcoe_ctlr_get_fip_mode(struct fcoe_ctlr_device *); | 379 | void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *); |
360 | 380 | ||
361 | /** | 381 | /** |
362 | * struct netdev_list | 382 | * struct netdev_list |
@@ -372,4 +392,12 @@ struct fcoe_netdev_mapping { | |||
372 | int fcoe_transport_attach(struct fcoe_transport *ft); | 392 | int fcoe_transport_attach(struct fcoe_transport *ft); |
373 | int fcoe_transport_detach(struct fcoe_transport *ft); | 393 | int fcoe_transport_detach(struct fcoe_transport *ft); |
374 | 394 | ||
395 | /* sysfs store handler for ctrl_control interface */ | ||
396 | ssize_t fcoe_ctlr_create_store(struct bus_type *bus, | ||
397 | const char *buf, size_t count); | ||
398 | ssize_t fcoe_ctlr_destroy_store(struct bus_type *bus, | ||
399 | const char *buf, size_t count); | ||
400 | |||
375 | #endif /* _LIBFCOE_H */ | 401 | #endif /* _LIBFCOE_H */ |
402 | |||
403 | |||
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 49084807eb6b..2b6956e9853d 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -873,7 +873,7 @@ static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsign | |||
873 | SHOST_DIF_TYPE2_PROTECTION, | 873 | SHOST_DIF_TYPE2_PROTECTION, |
874 | SHOST_DIF_TYPE3_PROTECTION }; | 874 | SHOST_DIF_TYPE3_PROTECTION }; |
875 | 875 | ||
876 | if (target_type > SHOST_DIF_TYPE3_PROTECTION) | 876 | if (target_type >= ARRAY_SIZE(cap)) |
877 | return 0; | 877 | return 0; |
878 | 878 | ||
879 | return shost->prot_capabilities & cap[target_type] ? target_type : 0; | 879 | return shost->prot_capabilities & cap[target_type] ? target_type : 0; |
@@ -887,7 +887,7 @@ static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsign | |||
887 | SHOST_DIX_TYPE2_PROTECTION, | 887 | SHOST_DIX_TYPE2_PROTECTION, |
888 | SHOST_DIX_TYPE3_PROTECTION }; | 888 | SHOST_DIX_TYPE3_PROTECTION }; |
889 | 889 | ||
890 | if (target_type > SHOST_DIX_TYPE3_PROTECTION) | 890 | if (target_type >= ARRAY_SIZE(cap)) |
891 | return 0; | 891 | return 0; |
892 | 892 | ||
893 | return shost->prot_capabilities & cap[target_type]; | 893 | return shost->prot_capabilities & cap[target_type]; |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index c0457c0d1a68..4ee471003859 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -2255,64 +2255,48 @@ TRACE_EVENT(ext4_es_lookup_extent_exit, | |||
2255 | __entry->found ? __entry->status : 0) | 2255 | __entry->found ? __entry->status : 0) |
2256 | ); | 2256 | ); |
2257 | 2257 | ||
2258 | TRACE_EVENT(ext4_es_reclaim_extents_count, | ||
2259 | TP_PROTO(struct super_block *sb, int nr_cached), | ||
2260 | |||
2261 | TP_ARGS(sb, nr_cached), | ||
2262 | |||
2263 | TP_STRUCT__entry( | ||
2264 | __field( dev_t, dev ) | ||
2265 | __field( int, nr_cached ) | ||
2266 | ), | ||
2267 | |||
2268 | TP_fast_assign( | ||
2269 | __entry->dev = sb->s_dev; | ||
2270 | __entry->nr_cached = nr_cached; | ||
2271 | ), | ||
2272 | |||
2273 | TP_printk("dev %d,%d cached objects nr %d", | ||
2274 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
2275 | __entry->nr_cached) | ||
2276 | ); | ||
2277 | |||
2278 | TRACE_EVENT(ext4_es_shrink_enter, | 2258 | TRACE_EVENT(ext4_es_shrink_enter, |
2279 | TP_PROTO(struct super_block *sb, int nr_to_scan), | 2259 | TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt), |
2280 | 2260 | ||
2281 | TP_ARGS(sb, nr_to_scan), | 2261 | TP_ARGS(sb, nr_to_scan, cache_cnt), |
2282 | 2262 | ||
2283 | TP_STRUCT__entry( | 2263 | TP_STRUCT__entry( |
2284 | __field( dev_t, dev ) | 2264 | __field( dev_t, dev ) |
2285 | __field( int, nr_to_scan ) | 2265 | __field( int, nr_to_scan ) |
2266 | __field( int, cache_cnt ) | ||
2286 | ), | 2267 | ), |
2287 | 2268 | ||
2288 | TP_fast_assign( | 2269 | TP_fast_assign( |
2289 | __entry->dev = sb->s_dev; | 2270 | __entry->dev = sb->s_dev; |
2290 | __entry->nr_to_scan = nr_to_scan; | 2271 | __entry->nr_to_scan = nr_to_scan; |
2272 | __entry->cache_cnt = cache_cnt; | ||
2291 | ), | 2273 | ), |
2292 | 2274 | ||
2293 | TP_printk("dev %d,%d nr to scan %d", | 2275 | TP_printk("dev %d,%d nr_to_scan %d cache_cnt %d", |
2294 | MAJOR(__entry->dev), MINOR(__entry->dev), | 2276 | MAJOR(__entry->dev), MINOR(__entry->dev), |
2295 | __entry->nr_to_scan) | 2277 | __entry->nr_to_scan, __entry->cache_cnt) |
2296 | ); | 2278 | ); |
2297 | 2279 | ||
2298 | TRACE_EVENT(ext4_es_shrink_exit, | 2280 | TRACE_EVENT(ext4_es_shrink_exit, |
2299 | TP_PROTO(struct super_block *sb, int shrunk_nr), | 2281 | TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt), |
2300 | 2282 | ||
2301 | TP_ARGS(sb, shrunk_nr), | 2283 | TP_ARGS(sb, shrunk_nr, cache_cnt), |
2302 | 2284 | ||
2303 | TP_STRUCT__entry( | 2285 | TP_STRUCT__entry( |
2304 | __field( dev_t, dev ) | 2286 | __field( dev_t, dev ) |
2305 | __field( int, shrunk_nr ) | 2287 | __field( int, shrunk_nr ) |
2288 | __field( int, cache_cnt ) | ||
2306 | ), | 2289 | ), |
2307 | 2290 | ||
2308 | TP_fast_assign( | 2291 | TP_fast_assign( |
2309 | __entry->dev = sb->s_dev; | 2292 | __entry->dev = sb->s_dev; |
2310 | __entry->shrunk_nr = shrunk_nr; | 2293 | __entry->shrunk_nr = shrunk_nr; |
2294 | __entry->cache_cnt = cache_cnt; | ||
2311 | ), | 2295 | ), |
2312 | 2296 | ||
2313 | TP_printk("dev %d,%d nr to scan %d", | 2297 | TP_printk("dev %d,%d shrunk_nr %d cache_cnt %d", |
2314 | MAJOR(__entry->dev), MINOR(__entry->dev), | 2298 | MAJOR(__entry->dev), MINOR(__entry->dev), |
2315 | __entry->shrunk_nr) | 2299 | __entry->shrunk_nr, __entry->cache_cnt) |
2316 | ); | 2300 | ); |
2317 | 2301 | ||
2318 | #endif /* _TRACE_EXT4_H */ | 2302 | #endif /* _TRACE_EXT4_H */ |
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 4e67194fd2c3..5c8a1d25e21c 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
@@ -68,6 +68,7 @@ header-y += blkpg.h | |||
68 | header-y += blktrace_api.h | 68 | header-y += blktrace_api.h |
69 | header-y += bpqether.h | 69 | header-y += bpqether.h |
70 | header-y += bsg.h | 70 | header-y += bsg.h |
71 | header-y += btrfs.h | ||
71 | header-y += can.h | 72 | header-y += can.h |
72 | header-y += capability.h | 73 | header-y += capability.h |
73 | header-y += capi.h | 74 | header-y += capi.h |
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h new file mode 100644 index 000000000000..fa3a5f9338fc --- /dev/null +++ b/include/uapi/linux/btrfs.h | |||
@@ -0,0 +1,514 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Oracle. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public | ||
6 | * License v2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
11 | * General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public | ||
14 | * License along with this program; if not, write to the | ||
15 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
16 | * Boston, MA 021110-1307, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef _UAPI_LINUX_BTRFS_H | ||
20 | #define _UAPI_LINUX_BTRFS_H | ||
21 | #include <linux/types.h> | ||
22 | #include <linux/ioctl.h> | ||
23 | |||
24 | #define BTRFS_IOCTL_MAGIC 0x94 | ||
25 | #define BTRFS_VOL_NAME_MAX 255 | ||
26 | |||
27 | /* this should be 4k */ | ||
28 | #define BTRFS_PATH_NAME_MAX 4087 | ||
29 | struct btrfs_ioctl_vol_args { | ||
30 | __s64 fd; | ||
31 | char name[BTRFS_PATH_NAME_MAX + 1]; | ||
32 | }; | ||
33 | |||
34 | #define BTRFS_DEVICE_PATH_NAME_MAX 1024 | ||
35 | |||
36 | #define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) | ||
37 | #define BTRFS_SUBVOL_RDONLY (1ULL << 1) | ||
38 | #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) | ||
39 | #define BTRFS_FSID_SIZE 16 | ||
40 | #define BTRFS_UUID_SIZE 16 | ||
41 | |||
42 | #define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0) | ||
43 | |||
44 | struct btrfs_qgroup_limit { | ||
45 | __u64 flags; | ||
46 | __u64 max_rfer; | ||
47 | __u64 max_excl; | ||
48 | __u64 rsv_rfer; | ||
49 | __u64 rsv_excl; | ||
50 | }; | ||
51 | |||
52 | struct btrfs_qgroup_inherit { | ||
53 | __u64 flags; | ||
54 | __u64 num_qgroups; | ||
55 | __u64 num_ref_copies; | ||
56 | __u64 num_excl_copies; | ||
57 | struct btrfs_qgroup_limit lim; | ||
58 | __u64 qgroups[0]; | ||
59 | }; | ||
60 | |||
61 | struct btrfs_ioctl_qgroup_limit_args { | ||
62 | __u64 qgroupid; | ||
63 | struct btrfs_qgroup_limit lim; | ||
64 | }; | ||
65 | |||
66 | #define BTRFS_SUBVOL_NAME_MAX 4039 | ||
67 | struct btrfs_ioctl_vol_args_v2 { | ||
68 | __s64 fd; | ||
69 | __u64 transid; | ||
70 | __u64 flags; | ||
71 | union { | ||
72 | struct { | ||
73 | __u64 size; | ||
74 | struct btrfs_qgroup_inherit __user *qgroup_inherit; | ||
75 | }; | ||
76 | __u64 unused[4]; | ||
77 | }; | ||
78 | char name[BTRFS_SUBVOL_NAME_MAX + 1]; | ||
79 | }; | ||
80 | |||
81 | /* | ||
82 | * structure to report errors and progress to userspace, either as a | ||
83 | * result of a finished scrub, a canceled scrub or a progress inquiry | ||
84 | */ | ||
85 | struct btrfs_scrub_progress { | ||
86 | __u64 data_extents_scrubbed; /* # of data extents scrubbed */ | ||
87 | __u64 tree_extents_scrubbed; /* # of tree extents scrubbed */ | ||
88 | __u64 data_bytes_scrubbed; /* # of data bytes scrubbed */ | ||
89 | __u64 tree_bytes_scrubbed; /* # of tree bytes scrubbed */ | ||
90 | __u64 read_errors; /* # of read errors encountered (EIO) */ | ||
91 | __u64 csum_errors; /* # of failed csum checks */ | ||
92 | __u64 verify_errors; /* # of occurences, where the metadata | ||
93 | * of a tree block did not match the | ||
94 | * expected values, like generation or | ||
95 | * logical */ | ||
96 | __u64 no_csum; /* # of 4k data block for which no csum | ||
97 | * is present, probably the result of | ||
98 | * data written with nodatasum */ | ||
99 | __u64 csum_discards; /* # of csum for which no data was found | ||
100 | * in the extent tree. */ | ||
101 | __u64 super_errors; /* # of bad super blocks encountered */ | ||
102 | __u64 malloc_errors; /* # of internal kmalloc errors. These | ||
103 | * will likely cause an incomplete | ||
104 | * scrub */ | ||
105 | __u64 uncorrectable_errors; /* # of errors where either no intact | ||
106 | * copy was found or the writeback | ||
107 | * failed */ | ||
108 | __u64 corrected_errors; /* # of errors corrected */ | ||
109 | __u64 last_physical; /* last physical address scrubbed. In | ||
110 | * case a scrub was aborted, this can | ||
111 | * be used to restart the scrub */ | ||
112 | __u64 unverified_errors; /* # of occurences where a read for a | ||
113 | * full (64k) bio failed, but the re- | ||
114 | * check succeeded for each 4k piece. | ||
115 | * Intermittent error. */ | ||
116 | }; | ||
117 | |||
118 | #define BTRFS_SCRUB_READONLY 1 | ||
119 | struct btrfs_ioctl_scrub_args { | ||
120 | __u64 devid; /* in */ | ||
121 | __u64 start; /* in */ | ||
122 | __u64 end; /* in */ | ||
123 | __u64 flags; /* in */ | ||
124 | struct btrfs_scrub_progress progress; /* out */ | ||
125 | /* pad to 1k */ | ||
126 | __u64 unused[(1024-32-sizeof(struct btrfs_scrub_progress))/8]; | ||
127 | }; | ||
128 | |||
129 | #define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_ALWAYS 0 | ||
130 | #define BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID 1 | ||
131 | struct btrfs_ioctl_dev_replace_start_params { | ||
132 | __u64 srcdevid; /* in, if 0, use srcdev_name instead */ | ||
133 | __u64 cont_reading_from_srcdev_mode; /* in, see #define | ||
134 | * above */ | ||
135 | __u8 srcdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1]; /* in */ | ||
136 | __u8 tgtdev_name[BTRFS_DEVICE_PATH_NAME_MAX + 1]; /* in */ | ||
137 | }; | ||
138 | |||
139 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED 0 | ||
140 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED 1 | ||
141 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED 2 | ||
142 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED 3 | ||
143 | #define BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED 4 | ||
144 | struct btrfs_ioctl_dev_replace_status_params { | ||
145 | __u64 replace_state; /* out, see #define above */ | ||
146 | __u64 progress_1000; /* out, 0 <= x <= 1000 */ | ||
147 | __u64 time_started; /* out, seconds since 1-Jan-1970 */ | ||
148 | __u64 time_stopped; /* out, seconds since 1-Jan-1970 */ | ||
149 | __u64 num_write_errors; /* out */ | ||
150 | __u64 num_uncorrectable_read_errors; /* out */ | ||
151 | }; | ||
152 | |||
153 | #define BTRFS_IOCTL_DEV_REPLACE_CMD_START 0 | ||
154 | #define BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS 1 | ||
155 | #define BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL 2 | ||
156 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR 0 | ||
157 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED 1 | ||
158 | #define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED 2 | ||
159 | struct btrfs_ioctl_dev_replace_args { | ||
160 | __u64 cmd; /* in */ | ||
161 | __u64 result; /* out */ | ||
162 | |||
163 | union { | ||
164 | struct btrfs_ioctl_dev_replace_start_params start; | ||
165 | struct btrfs_ioctl_dev_replace_status_params status; | ||
166 | }; /* in/out */ | ||
167 | |||
168 | __u64 spare[64]; | ||
169 | }; | ||
170 | |||
171 | struct btrfs_ioctl_dev_info_args { | ||
172 | __u64 devid; /* in/out */ | ||
173 | __u8 uuid[BTRFS_UUID_SIZE]; /* in/out */ | ||
174 | __u64 bytes_used; /* out */ | ||
175 | __u64 total_bytes; /* out */ | ||
176 | __u64 unused[379]; /* pad to 4k */ | ||
177 | __u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */ | ||
178 | }; | ||
179 | |||
180 | struct btrfs_ioctl_fs_info_args { | ||
181 | __u64 max_id; /* out */ | ||
182 | __u64 num_devices; /* out */ | ||
183 | __u8 fsid[BTRFS_FSID_SIZE]; /* out */ | ||
184 | __u64 reserved[124]; /* pad to 1k */ | ||
185 | }; | ||
186 | |||
187 | /* balance control ioctl modes */ | ||
188 | #define BTRFS_BALANCE_CTL_PAUSE 1 | ||
189 | #define BTRFS_BALANCE_CTL_CANCEL 2 | ||
190 | |||
191 | /* | ||
192 | * this is packed, because it should be exactly the same as its disk | ||
193 | * byte order counterpart (struct btrfs_disk_balance_args) | ||
194 | */ | ||
195 | struct btrfs_balance_args { | ||
196 | __u64 profiles; | ||
197 | __u64 usage; | ||
198 | __u64 devid; | ||
199 | __u64 pstart; | ||
200 | __u64 pend; | ||
201 | __u64 vstart; | ||
202 | __u64 vend; | ||
203 | |||
204 | __u64 target; | ||
205 | |||
206 | __u64 flags; | ||
207 | |||
208 | __u64 unused[8]; | ||
209 | } __attribute__ ((__packed__)); | ||
210 | |||
211 | /* report balance progress to userspace */ | ||
212 | struct btrfs_balance_progress { | ||
213 | __u64 expected; /* estimated # of chunks that will be | ||
214 | * relocated to fulfill the request */ | ||
215 | __u64 considered; /* # of chunks we have considered so far */ | ||
216 | __u64 completed; /* # of chunks relocated so far */ | ||
217 | }; | ||
218 | |||
219 | #define BTRFS_BALANCE_STATE_RUNNING (1ULL << 0) | ||
220 | #define BTRFS_BALANCE_STATE_PAUSE_REQ (1ULL << 1) | ||
221 | #define BTRFS_BALANCE_STATE_CANCEL_REQ (1ULL << 2) | ||
222 | |||
223 | struct btrfs_ioctl_balance_args { | ||
224 | __u64 flags; /* in/out */ | ||
225 | __u64 state; /* out */ | ||
226 | |||
227 | struct btrfs_balance_args data; /* in/out */ | ||
228 | struct btrfs_balance_args meta; /* in/out */ | ||
229 | struct btrfs_balance_args sys; /* in/out */ | ||
230 | |||
231 | struct btrfs_balance_progress stat; /* out */ | ||
232 | |||
233 | __u64 unused[72]; /* pad to 1k */ | ||
234 | }; | ||
235 | |||
236 | #define BTRFS_INO_LOOKUP_PATH_MAX 4080 | ||
237 | struct btrfs_ioctl_ino_lookup_args { | ||
238 | __u64 treeid; | ||
239 | __u64 objectid; | ||
240 | char name[BTRFS_INO_LOOKUP_PATH_MAX]; | ||
241 | }; | ||
242 | |||
243 | struct btrfs_ioctl_search_key { | ||
244 | /* which root are we searching. 0 is the tree of tree roots */ | ||
245 | __u64 tree_id; | ||
246 | |||
247 | /* keys returned will be >= min and <= max */ | ||
248 | __u64 min_objectid; | ||
249 | __u64 max_objectid; | ||
250 | |||
251 | /* keys returned will be >= min and <= max */ | ||
252 | __u64 min_offset; | ||
253 | __u64 max_offset; | ||
254 | |||
255 | /* max and min transids to search for */ | ||
256 | __u64 min_transid; | ||
257 | __u64 max_transid; | ||
258 | |||
259 | /* keys returned will be >= min and <= max */ | ||
260 | __u32 min_type; | ||
261 | __u32 max_type; | ||
262 | |||
263 | /* | ||
264 | * how many items did userland ask for, and how many are we | ||
265 | * returning | ||
266 | */ | ||
267 | __u32 nr_items; | ||
268 | |||
269 | /* align to 64 bits */ | ||
270 | __u32 unused; | ||
271 | |||
272 | /* some extra for later */ | ||
273 | __u64 unused1; | ||
274 | __u64 unused2; | ||
275 | __u64 unused3; | ||
276 | __u64 unused4; | ||
277 | }; | ||
278 | |||
279 | struct btrfs_ioctl_search_header { | ||
280 | __u64 transid; | ||
281 | __u64 objectid; | ||
282 | __u64 offset; | ||
283 | __u32 type; | ||
284 | __u32 len; | ||
285 | }; | ||
286 | |||
287 | #define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key)) | ||
288 | /* | ||
289 | * the buf is an array of search headers where | ||
290 | * each header is followed by the actual item | ||
291 | * the type field is expanded to 32 bits for alignment | ||
292 | */ | ||
293 | struct btrfs_ioctl_search_args { | ||
294 | struct btrfs_ioctl_search_key key; | ||
295 | char buf[BTRFS_SEARCH_ARGS_BUFSIZE]; | ||
296 | }; | ||
297 | |||
298 | struct btrfs_ioctl_clone_range_args { | ||
299 | __s64 src_fd; | ||
300 | __u64 src_offset, src_length; | ||
301 | __u64 dest_offset; | ||
302 | }; | ||
303 | |||
304 | /* flags for the defrag range ioctl */ | ||
305 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 | ||
306 | #define BTRFS_DEFRAG_RANGE_START_IO 2 | ||
307 | |||
308 | struct btrfs_ioctl_space_info { | ||
309 | __u64 flags; | ||
310 | __u64 total_bytes; | ||
311 | __u64 used_bytes; | ||
312 | }; | ||
313 | |||
314 | struct btrfs_ioctl_space_args { | ||
315 | __u64 space_slots; | ||
316 | __u64 total_spaces; | ||
317 | struct btrfs_ioctl_space_info spaces[0]; | ||
318 | }; | ||
319 | |||
320 | struct btrfs_data_container { | ||
321 | __u32 bytes_left; /* out -- bytes not needed to deliver output */ | ||
322 | __u32 bytes_missing; /* out -- additional bytes needed for result */ | ||
323 | __u32 elem_cnt; /* out */ | ||
324 | __u32 elem_missed; /* out */ | ||
325 | __u64 val[0]; /* out */ | ||
326 | }; | ||
327 | |||
328 | struct btrfs_ioctl_ino_path_args { | ||
329 | __u64 inum; /* in */ | ||
330 | __u64 size; /* in */ | ||
331 | __u64 reserved[4]; | ||
332 | /* struct btrfs_data_container *fspath; out */ | ||
333 | __u64 fspath; /* out */ | ||
334 | }; | ||
335 | |||
336 | struct btrfs_ioctl_logical_ino_args { | ||
337 | __u64 logical; /* in */ | ||
338 | __u64 size; /* in */ | ||
339 | __u64 reserved[4]; | ||
340 | /* struct btrfs_data_container *inodes; out */ | ||
341 | __u64 inodes; | ||
342 | }; | ||
343 | |||
344 | enum btrfs_dev_stat_values { | ||
345 | /* disk I/O failure stats */ | ||
346 | BTRFS_DEV_STAT_WRITE_ERRS, /* EIO or EREMOTEIO from lower layers */ | ||
347 | BTRFS_DEV_STAT_READ_ERRS, /* EIO or EREMOTEIO from lower layers */ | ||
348 | BTRFS_DEV_STAT_FLUSH_ERRS, /* EIO or EREMOTEIO from lower layers */ | ||
349 | |||
350 | /* stats for indirect indications for I/O failures */ | ||
351 | BTRFS_DEV_STAT_CORRUPTION_ERRS, /* checksum error, bytenr error or | ||
352 | * contents is illegal: this is an | ||
353 | * indication that the block was damaged | ||
354 | * during read or write, or written to | ||
355 | * wrong location or read from wrong | ||
356 | * location */ | ||
357 | BTRFS_DEV_STAT_GENERATION_ERRS, /* an indication that blocks have not | ||
358 | * been written */ | ||
359 | |||
360 | BTRFS_DEV_STAT_VALUES_MAX | ||
361 | }; | ||
362 | |||
363 | /* Reset statistics after reading; needs SYS_ADMIN capability */ | ||
364 | #define BTRFS_DEV_STATS_RESET (1ULL << 0) | ||
365 | |||
366 | struct btrfs_ioctl_get_dev_stats { | ||
367 | __u64 devid; /* in */ | ||
368 | __u64 nr_items; /* in/out */ | ||
369 | __u64 flags; /* in/out */ | ||
370 | |||
371 | /* out values: */ | ||
372 | __u64 values[BTRFS_DEV_STAT_VALUES_MAX]; | ||
373 | |||
374 | __u64 unused[128 - 2 - BTRFS_DEV_STAT_VALUES_MAX]; /* pad to 1k */ | ||
375 | }; | ||
376 | |||
377 | #define BTRFS_QUOTA_CTL_ENABLE 1 | ||
378 | #define BTRFS_QUOTA_CTL_DISABLE 2 | ||
379 | #define BTRFS_QUOTA_CTL_RESCAN 3 | ||
380 | struct btrfs_ioctl_quota_ctl_args { | ||
381 | __u64 cmd; | ||
382 | __u64 status; | ||
383 | }; | ||
384 | |||
385 | struct btrfs_ioctl_qgroup_assign_args { | ||
386 | __u64 assign; | ||
387 | __u64 src; | ||
388 | __u64 dst; | ||
389 | }; | ||
390 | |||
391 | struct btrfs_ioctl_qgroup_create_args { | ||
392 | __u64 create; | ||
393 | __u64 qgroupid; | ||
394 | }; | ||
395 | struct btrfs_ioctl_timespec { | ||
396 | __u64 sec; | ||
397 | __u32 nsec; | ||
398 | }; | ||
399 | |||
400 | struct btrfs_ioctl_received_subvol_args { | ||
401 | char uuid[BTRFS_UUID_SIZE]; /* in */ | ||
402 | __u64 stransid; /* in */ | ||
403 | __u64 rtransid; /* out */ | ||
404 | struct btrfs_ioctl_timespec stime; /* in */ | ||
405 | struct btrfs_ioctl_timespec rtime; /* out */ | ||
406 | __u64 flags; /* in */ | ||
407 | __u64 reserved[16]; /* in */ | ||
408 | }; | ||
409 | |||
410 | /* | ||
411 | * Caller doesn't want file data in the send stream, even if the | ||
412 | * search of clone sources doesn't find an extent. UPDATE_EXTENT | ||
413 | * commands will be sent instead of WRITE commands. | ||
414 | */ | ||
415 | #define BTRFS_SEND_FLAG_NO_FILE_DATA 0x1 | ||
416 | |||
417 | struct btrfs_ioctl_send_args { | ||
418 | __s64 send_fd; /* in */ | ||
419 | __u64 clone_sources_count; /* in */ | ||
420 | __u64 __user *clone_sources; /* in */ | ||
421 | __u64 parent_root; /* in */ | ||
422 | __u64 flags; /* in */ | ||
423 | __u64 reserved[4]; /* in */ | ||
424 | }; | ||
425 | |||
426 | #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \ | ||
427 | struct btrfs_ioctl_vol_args) | ||
428 | #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \ | ||
429 | struct btrfs_ioctl_vol_args) | ||
430 | #define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \ | ||
431 | struct btrfs_ioctl_vol_args) | ||
432 | #define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \ | ||
433 | struct btrfs_ioctl_vol_args) | ||
434 | /* trans start and trans end are dangerous, and only for | ||
435 | * use by applications that know how to avoid the | ||
436 | * resulting deadlocks | ||
437 | */ | ||
438 | #define BTRFS_IOC_TRANS_START _IO(BTRFS_IOCTL_MAGIC, 6) | ||
439 | #define BTRFS_IOC_TRANS_END _IO(BTRFS_IOCTL_MAGIC, 7) | ||
440 | #define BTRFS_IOC_SYNC _IO(BTRFS_IOCTL_MAGIC, 8) | ||
441 | |||
442 | #define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int) | ||
443 | #define BTRFS_IOC_ADD_DEV _IOW(BTRFS_IOCTL_MAGIC, 10, \ | ||
444 | struct btrfs_ioctl_vol_args) | ||
445 | #define BTRFS_IOC_RM_DEV _IOW(BTRFS_IOCTL_MAGIC, 11, \ | ||
446 | struct btrfs_ioctl_vol_args) | ||
447 | #define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \ | ||
448 | struct btrfs_ioctl_vol_args) | ||
449 | |||
450 | #define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \ | ||
451 | struct btrfs_ioctl_clone_range_args) | ||
452 | |||
453 | #define BTRFS_IOC_SUBVOL_CREATE _IOW(BTRFS_IOCTL_MAGIC, 14, \ | ||
454 | struct btrfs_ioctl_vol_args) | ||
455 | #define BTRFS_IOC_SNAP_DESTROY _IOW(BTRFS_IOCTL_MAGIC, 15, \ | ||
456 | struct btrfs_ioctl_vol_args) | ||
457 | #define BTRFS_IOC_DEFRAG_RANGE _IOW(BTRFS_IOCTL_MAGIC, 16, \ | ||
458 | struct btrfs_ioctl_defrag_range_args) | ||
459 | #define BTRFS_IOC_TREE_SEARCH _IOWR(BTRFS_IOCTL_MAGIC, 17, \ | ||
460 | struct btrfs_ioctl_search_args) | ||
461 | #define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \ | ||
462 | struct btrfs_ioctl_ino_lookup_args) | ||
463 | #define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64) | ||
464 | #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \ | ||
465 | struct btrfs_ioctl_space_args) | ||
466 | #define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64) | ||
467 | #define BTRFS_IOC_WAIT_SYNC _IOW(BTRFS_IOCTL_MAGIC, 22, __u64) | ||
468 | #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \ | ||
469 | struct btrfs_ioctl_vol_args_v2) | ||
470 | #define BTRFS_IOC_SUBVOL_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 24, \ | ||
471 | struct btrfs_ioctl_vol_args_v2) | ||
472 | #define BTRFS_IOC_SUBVOL_GETFLAGS _IOR(BTRFS_IOCTL_MAGIC, 25, __u64) | ||
473 | #define BTRFS_IOC_SUBVOL_SETFLAGS _IOW(BTRFS_IOCTL_MAGIC, 26, __u64) | ||
474 | #define BTRFS_IOC_SCRUB _IOWR(BTRFS_IOCTL_MAGIC, 27, \ | ||
475 | struct btrfs_ioctl_scrub_args) | ||
476 | #define BTRFS_IOC_SCRUB_CANCEL _IO(BTRFS_IOCTL_MAGIC, 28) | ||
477 | #define BTRFS_IOC_SCRUB_PROGRESS _IOWR(BTRFS_IOCTL_MAGIC, 29, \ | ||
478 | struct btrfs_ioctl_scrub_args) | ||
479 | #define BTRFS_IOC_DEV_INFO _IOWR(BTRFS_IOCTL_MAGIC, 30, \ | ||
480 | struct btrfs_ioctl_dev_info_args) | ||
481 | #define BTRFS_IOC_FS_INFO _IOR(BTRFS_IOCTL_MAGIC, 31, \ | ||
482 | struct btrfs_ioctl_fs_info_args) | ||
483 | #define BTRFS_IOC_BALANCE_V2 _IOWR(BTRFS_IOCTL_MAGIC, 32, \ | ||
484 | struct btrfs_ioctl_balance_args) | ||
485 | #define BTRFS_IOC_BALANCE_CTL _IOW(BTRFS_IOCTL_MAGIC, 33, int) | ||
486 | #define BTRFS_IOC_BALANCE_PROGRESS _IOR(BTRFS_IOCTL_MAGIC, 34, \ | ||
487 | struct btrfs_ioctl_balance_args) | ||
488 | #define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \ | ||
489 | struct btrfs_ioctl_ino_path_args) | ||
490 | #define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \ | ||
491 | struct btrfs_ioctl_ino_path_args) | ||
492 | #define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \ | ||
493 | struct btrfs_ioctl_received_subvol_args) | ||
494 | #define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args) | ||
495 | #define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \ | ||
496 | struct btrfs_ioctl_vol_args) | ||
497 | #define BTRFS_IOC_QUOTA_CTL _IOWR(BTRFS_IOCTL_MAGIC, 40, \ | ||
498 | struct btrfs_ioctl_quota_ctl_args) | ||
499 | #define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \ | ||
500 | struct btrfs_ioctl_qgroup_assign_args) | ||
501 | #define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \ | ||
502 | struct btrfs_ioctl_qgroup_create_args) | ||
503 | #define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \ | ||
504 | struct btrfs_ioctl_qgroup_limit_args) | ||
505 | #define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \ | ||
506 | char[BTRFS_LABEL_SIZE]) | ||
507 | #define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \ | ||
508 | char[BTRFS_LABEL_SIZE]) | ||
509 | #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \ | ||
510 | struct btrfs_ioctl_get_dev_stats) | ||
511 | #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ | ||
512 | struct btrfs_ioctl_dev_replace_args) | ||
513 | |||
514 | #endif /* _UAPI_LINUX_BTRFS_H */ | ||
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h index 539b179b349c..7e75b6fd8d45 100644 --- a/include/uapi/linux/dm-ioctl.h +++ b/include/uapi/linux/dm-ioctl.h | |||
@@ -267,9 +267,9 @@ enum { | |||
267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
268 | 268 | ||
269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
270 | #define DM_VERSION_MINOR 23 | 270 | #define DM_VERSION_MINOR 24 |
271 | #define DM_VERSION_PATCHLEVEL 1 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
272 | #define DM_VERSION_EXTRA "-ioctl (2012-12-18)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2013-01-15)" |
273 | 273 | ||
274 | /* Status bits */ | 274 | /* Status bits */ |
275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
@@ -336,4 +336,9 @@ enum { | |||
336 | */ | 336 | */ |
337 | #define DM_SECURE_DATA_FLAG (1 << 15) /* In */ | 337 | #define DM_SECURE_DATA_FLAG (1 << 15) /* In */ |
338 | 338 | ||
339 | /* | ||
340 | * If set, a message generated output data. | ||
341 | */ | ||
342 | #define DM_DATA_OUT_FLAG (1 << 16) /* Out */ | ||
343 | |||
339 | #endif /* _LINUX_DM_IOCTL_H */ | 344 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/uapi/scsi/Kbuild b/include/uapi/scsi/Kbuild index 29a87dd26cfb..75746d52f208 100644 --- a/include/uapi/scsi/Kbuild +++ b/include/uapi/scsi/Kbuild | |||
@@ -1,2 +1,5 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += fc/ | 2 | header-y += fc/ |
3 | header-y += scsi_bsg_fc.h | ||
4 | header-y += scsi_netlink.h | ||
5 | header-y += scsi_netlink_fc.h | ||
diff --git a/include/uapi/scsi/fc/Kbuild b/include/uapi/scsi/fc/Kbuild index aafaa5aa54d4..5ead9fac265c 100644 --- a/include/uapi/scsi/fc/Kbuild +++ b/include/uapi/scsi/fc/Kbuild | |||
@@ -1 +1,5 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += fc_els.h | ||
3 | header-y += fc_fs.h | ||
4 | header-y += fc_gs.h | ||
5 | header-y += fc_ns.h | ||
diff --git a/include/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h index 481abbd48e39..481abbd48e39 100644 --- a/include/scsi/fc/fc_els.h +++ b/include/uapi/scsi/fc/fc_els.h | |||
diff --git a/include/scsi/fc/fc_fs.h b/include/uapi/scsi/fc/fc_fs.h index 50f28b143451..50f28b143451 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/uapi/scsi/fc/fc_fs.h | |||
diff --git a/include/scsi/fc/fc_gs.h b/include/uapi/scsi/fc/fc_gs.h index a37346d47eb1..a37346d47eb1 100644 --- a/include/scsi/fc/fc_gs.h +++ b/include/uapi/scsi/fc/fc_gs.h | |||
diff --git a/include/scsi/fc/fc_ns.h b/include/uapi/scsi/fc/fc_ns.h index f7751d53f1d3..f7751d53f1d3 100644 --- a/include/scsi/fc/fc_ns.h +++ b/include/uapi/scsi/fc/fc_ns.h | |||
diff --git a/include/scsi/scsi_bsg_fc.h b/include/uapi/scsi/scsi_bsg_fc.h index 3031b900b087..3031b900b087 100644 --- a/include/scsi/scsi_bsg_fc.h +++ b/include/uapi/scsi/scsi_bsg_fc.h | |||
diff --git a/include/scsi/scsi_netlink.h b/include/uapi/scsi/scsi_netlink.h index 62b4edab15d3..62b4edab15d3 100644 --- a/include/scsi/scsi_netlink.h +++ b/include/uapi/scsi/scsi_netlink.h | |||
diff --git a/include/scsi/scsi_netlink_fc.h b/include/uapi/scsi/scsi_netlink_fc.h index cbf76e479761..cbf76e479761 100644 --- a/include/scsi/scsi_netlink_fc.h +++ b/include/uapi/scsi/scsi_netlink_fc.h | |||