Pull device mapper updates from Mike Snitzer: - various fixes and improvements to request-based DM and DM multipath - some locking improvements in DM bufio - add Kconfig option to disable the DM block manager's extra locking which mainly serves as a developer tool - a few bug fixes to DM's persistent-data - a couple changes to prepare for multipage biovec support in the block layer - various improvements and cleanups in the DM core, DM cache, DM raid and DM crypt - add ability to have DM crypt use keys from the kernel key retention service - add a new "error_writes" feature to the DM flakey target, reads are left unchanged in this mode * tag 'dm-4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (40 commits) dm flakey: introduce "error_writes" feature dm cache policy smq: use hash_32() instead of hash_32_generic() dm crypt: reject key strings containing whitespace chars dm space map: always set ev if sm_ll_mutate() succeeds dm space map metadata: skip useless memcpy in metadata_ll_init_index() dm space map metadata: fix 'struct sm_metadata' leak on failed create Documentation: dm raid: define data_offset status field dm raid: fix discard support regression dm raid: don't allow "write behind" with raid4/5/6 dm mpath: use hw_handler_params if attached hw_handler is same as requested dm crypt: add ability to use keys from the kernel key retention service dm array: remove a dead assignment in populate_ablock_with_values() dm ioctl: use offsetof() instead of open-coding it dm rq: simplify use_blk_mq initialization dm: use blk_set_queue_dying() in __dm_destroy() dm bufio: drop the lock when doing GFP_NOIO allocation dm bufio: don't take the lock in dm_bufio_shrink_count dm bufio: avoid sleeping while holding the dm_bufio lock dm table: simplify dm_table_determine_type() dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device ...
Showing the changes to include/uapi/linux (1 of 22 files). Show all
Unified · Split
| @@ -7,6 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | #ifndef __DM_LOG_USERSPACE_H__ |
| 8 | 8 | #define __DM_LOG_USERSPACE_H__ |
| 9 | 9 | |
| 10 | +#include <linux/types.h> | |
| 10 | 11 | #include <linux/dm-ioctl.h> /* For DM_UUID_LEN */ |
| 11 | 12 | |
| 12 | 13 | /* |
| @@ -147,12 +148,12 @@ · 134 unmodified lines | ||
| 147 | 148 | |
| 148 | 149 | /* |
| 149 | 150 | * DM_ULOG_GET_REGION_SIZE corresponds to (found in dm-dirty-log.h): |
| 150 | − * uint32_t (*get_region_size)(struct dm_dirty_log *log); | |
| 151 | + * __u32 (*get_region_size)(struct dm_dirty_log *log); | |
| 151 | 152 | * |
| 152 | 153 | * Payload-to-userspace: |
| 153 | 154 | * None. |
| 154 | 155 | * Payload-to-kernel: |
| 155 | − * uint64_t - contains the region size | |
| 156 | + * __u64 - contains the region size | |
| 156 | 157 | * |
| 157 | 158 | * The region size is something that was determined at constructor time. |
| 158 | 159 | * It is returned in the payload area and 'data_size' is set to |
| @@ -168,11 +169,11 @@ · 9 unmodified lines | ||
| 168 | 169 | * int (*is_clean)(struct dm_dirty_log *log, region_t region); |
| 169 | 170 | * |
| 170 | 171 | * Payload-to-userspace: |
| 171 | − * uint64_t - the region to get clean status on | |
| 172 | + * __u64 - the region to get clean status on | |
| 172 | 173 | * Payload-to-kernel: |
| 173 | − * int64_t - 1 if clean, 0 otherwise | |
| 174 | + * __s64 - 1 if clean, 0 otherwise | |
| 174 | 175 | * |
| 175 | − * Payload is sizeof(uint64_t) and contains the region for which the clean | |
| 176 | + * Payload is sizeof(__u64) and contains the region for which the clean | |
| 176 | 177 | * status is being made. |
| 177 | 178 | * |
| 178 | 179 | * When the request has been processed, user-space must return the |
| @@ -187,9 +188,9 @@ · 8 unmodified lines | ||
| 187 | 188 | * int can_block); |
| 188 | 189 | * |
| 189 | 190 | * Payload-to-userspace: |
| 190 | − * uint64_t - the region to get sync status on | |
| 191 | + * __u64 - the region to get sync status on | |
| 191 | 192 | * Payload-to-kernel: |
| 192 | − * int64_t - 1 if in-sync, 0 otherwise | |
| 193 | + * __s64 - 1 if in-sync, 0 otherwise | |
| 193 | 194 | * |
| 194 | 195 | * Exactly the same as 'is_clean' above, except this time asking "has the |
| 195 | 196 | * region been recovered?" vs. "is the region not being modified?" |
| @@ -203,7 +204,7 @@ · 7 unmodified lines | ||
| 203 | 204 | * Payload-to-userspace: |
| 204 | 205 | * If the 'integrated_flush' directive is present in the constructor |
| 205 | 206 | * table, the payload is as same as DM_ULOG_MARK_REGION: |
| 206 | − * uint64_t [] - region(s) to mark | |
| 207 | + * __u64 [] - region(s) to mark | |
| 207 | 208 | * else |
| 208 | 209 | * None |
| 209 | 210 | * Payload-to-kernel: |
| @@ -225,13 +226,13 @@ · 15 unmodified lines | ||
| 225 | 226 | * void (*mark_region)(struct dm_dirty_log *log, region_t region); |
| 226 | 227 | * |
| 227 | 228 | * Payload-to-userspace: |
| 228 | − * uint64_t [] - region(s) to mark | |
| 229 | + * __u64 [] - region(s) to mark | |
| 229 | 230 | * Payload-to-kernel: |
| 230 | 231 | * None. |
| 231 | 232 | * |
| 232 | 233 | * Incoming payload contains the one or more regions to mark dirty. |
| 233 | 234 | * The number of regions contained in the payload can be determined from |
| 234 | − * 'data_size/sizeof(uint64_t)'. | |
| 235 | + * 'data_size/sizeof(__u64)'. | |
| 235 | 236 | * |
| 236 | 237 | * When the request has been processed, user-space must return the |
| 237 | 238 | * dm_ulog_request to the kernel - setting the 'error' field and clearing |
| @@ -244,13 +245,13 @@ · 6 unmodified lines | ||
| 244 | 245 | * void (*clear_region)(struct dm_dirty_log *log, region_t region); |
| 245 | 246 | * |
| 246 | 247 | * Payload-to-userspace: |
| 247 | − * uint64_t [] - region(s) to clear | |
| 248 | + * __u64 [] - region(s) to clear | |
| 248 | 249 | * Payload-to-kernel: |
| 249 | 250 | * None. |
| 250 | 251 | * |
| 251 | 252 | * Incoming payload contains the one or more regions to mark clean. |
| 252 | 253 | * The number of regions contained in the payload can be determined from |
| 253 | − * 'data_size/sizeof(uint64_t)'. | |
| 254 | + * 'data_size/sizeof(__u64)'. | |
| 254 | 255 | * |
| 255 | 256 | * When the request has been processed, user-space must return the |
| 256 | 257 | * dm_ulog_request to the kernel - setting the 'error' field and clearing |
| @@ -266,8 +267,8 @@ · 9 unmodified lines | ||
| 266 | 267 | * None. |
| 267 | 268 | * Payload-to-kernel: |
| 268 | 269 | * { |
| 269 | − * int64_t i; -- 1 if recovery necessary, 0 otherwise | |
| 270 | − * uint64_t r; -- The region to recover if i=1 | |
| 270 | + * __s64 i; -- 1 if recovery necessary, 0 otherwise | |
| 271 | + * __u64 r; -- The region to recover if i=1 | |
| 271 | 272 | * } |
| 272 | 273 | * 'data_size' should be set appropriately. |
| 273 | 274 | * |
| @@ -283,8 +284,8 @@ · 9 unmodified lines | ||
| 283 | 284 | * |
| 284 | 285 | * Payload-to-userspace: |
| 285 | 286 | * { |
| 286 | − * uint64_t - region to set sync state on | |
| 287 | − * int64_t - 0 if not-in-sync, 1 if in-sync | |
| 287 | + * __u64 - region to set sync state on | |
| 288 | + * __s64 - 0 if not-in-sync, 1 if in-sync | |
| 288 | 289 | * } |
| 289 | 290 | * Payload-to-kernel: |
| 290 | 291 | * None. |
| @@ -302,7 +303,7 @@ · 11 unmodified lines | ||
| 302 | 303 | * Payload-to-userspace: |
| 303 | 304 | * None. |
| 304 | 305 | * Payload-to-kernel: |
| 305 | − * uint64_t - the number of in-sync regions | |
| 306 | + * __u64 - the number of in-sync regions | |
| 306 | 307 | * |
| 307 | 308 | * No incoming payload. Kernel-bound payload contains the number of |
| 308 | 309 | * regions that are in-sync (in a size_t). |
| @@ -350,11 +351,11 @@ · 41 unmodified lines | ||
| 350 | 351 | * int (*is_remote_recovering)(struct dm_dirty_log *log, region_t region); |
| 351 | 352 | * |
| 352 | 353 | * Payload-to-userspace: |
| 353 | − * uint64_t - region to determine recovery status on | |
| 354 | + * __u64 - region to determine recovery status on | |
| 354 | 355 | * Payload-to-kernel: |
| 355 | 356 | * { |
| 356 | − * int64_t is_recovering; -- 0 if no, 1 if yes | |
| 357 | − * uint64_t in_sync_hint; -- lowest region still needing resync | |
| 357 | + * __s64 is_recovering; -- 0 if no, 1 if yes | |
| 358 | + * __u64 in_sync_hint; -- lowest region still needing resync | |
| 358 | 359 | * } |
| 359 | 360 | * |
| 360 | 361 | * When the request has been processed, user-space must return the |
| @@ -413,16 +414,16 @@ struct dm_ulog_request { · 52 unmodified lines | ||
| 413 | 414 | * differentiate between logs that are being swapped and have the |
| 414 | 415 | * same 'uuid'. (Think "live" and "inactive" device-mapper tables.) |
| 415 | 416 | */ |
| 416 | − uint64_t luid; | |
| 417 | + __u64 luid; | |
| 417 | 418 | char uuid[DM_UUID_LEN]; |
| 418 | 419 | char padding[3]; /* Padding because DM_UUID_LEN = 129 */ |
| 419 | 420 | |
| 420 | − uint32_t version; /* See DM_ULOG_REQUEST_VERSION */ | |
| 421 | − int32_t error; /* Used to report back processing errors */ | |
| 421 | + __u32 version; /* See DM_ULOG_REQUEST_VERSION */ | |
| 422 | + __s32 error; /* Used to report back processing errors */ | |
| 422 | 423 | |
| 423 | − uint32_t seq; /* Sequence number for request */ | |
| 424 | − uint32_t request_type; /* DM_ULOG_* defined above */ | |
| 425 | − uint32_t data_size; /* How much data (not including this struct) */ | |
| 424 | + __u32 seq; /* Sequence number for request */ | |
| 425 | + __u32 request_type; /* DM_ULOG_* defined above */ | |
| 426 | + __u32 data_size; /* How much data (not including this struct) */ | |
| 426 | 427 | |
| 427 | 428 | char data[0]; |
| 428 | 429 | }; |