History

Merge tag 'dm-4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

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 ...

Linus Torvalds committed 9 years ago

Commit 775a2e22 parents 2a4c32e ef548c522 files · +461 −200Browse files

Showing the changes to include/uapi/linux (1 of 22 files). Show all

Unified · Split

include/uapi/linux/dm-log-userspace.h+27−26
@@ -7,6 +7,7 @@ · 6 unmodified lines
7#ifndef __DM_LOG_USERSPACE_H__7#ifndef __DM_LOG_USERSPACE_H__
8#define __DM_LOG_USERSPACE_H__8#define __DM_LOG_USERSPACE_H__
9 9
10#include <linux/types.h>
10#include <linux/dm-ioctl.h> /* For DM_UUID_LEN */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 * DM_ULOG_GET_REGION_SIZE corresponds to (found in dm-dirty-log.h):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 * Payload-to-userspace:153 * Payload-to-userspace:
153 * None.154 * None.
154 * Payload-to-kernel:155 * Payload-to-kernel:
155 * uint64_t - contains the region size156 * __u64 - contains the region size
156 *157 *
157 * The region size is something that was determined at constructor time.158 * The region size is something that was determined at constructor time.
158 * It is returned in the payload area and 'data_size' is set to159 * It is returned in the payload area and 'data_size' is set to
@@ -168,11 +169,11 @@ · 9 unmodified lines
168 * int (*is_clean)(struct dm_dirty_log *log, region_t region);169 * int (*is_clean)(struct dm_dirty_log *log, region_t region);
169 *170 *
170 * Payload-to-userspace:171 * Payload-to-userspace:
171 * uint64_t - the region to get clean status on172 * __u64 - the region to get clean status on
172 * Payload-to-kernel:173 * Payload-to-kernel:
173 * int64_t - 1 if clean, 0 otherwise174 * __s64 - 1 if clean, 0 otherwise
174 *175 *
175 * Payload is sizeof(uint64_t) and contains the region for which the clean176 * Payload is sizeof(__u64) and contains the region for which the clean
176 * status is being made.177 * status is being made.
177 *178 *
178 * When the request has been processed, user-space must return the179 * When the request has been processed, user-space must return the
@@ -187,9 +188,9 @@ · 8 unmodified lines
187 * int can_block);188 * int can_block);
188 *189 *
189 * Payload-to-userspace:190 * Payload-to-userspace:
190 * uint64_t - the region to get sync status on191 * __u64 - the region to get sync status on
191 * Payload-to-kernel:192 * Payload-to-kernel:
192 * int64_t - 1 if in-sync, 0 otherwise193 * __s64 - 1 if in-sync, 0 otherwise
193 *194 *
194 * Exactly the same as 'is_clean' above, except this time asking "has the195 * Exactly the same as 'is_clean' above, except this time asking "has the
195 * region been recovered?" vs. "is the region not being modified?"196 * region been recovered?" vs. "is the region not being modified?"
@@ -203,7 +204,7 @@ · 7 unmodified lines
203 * Payload-to-userspace:204 * Payload-to-userspace:
204 * If the 'integrated_flush' directive is present in the constructor205 * If the 'integrated_flush' directive is present in the constructor
205 * table, the payload is as same as DM_ULOG_MARK_REGION:206 * table, the payload is as same as DM_ULOG_MARK_REGION:
206 * uint64_t [] - region(s) to mark207 * __u64 [] - region(s) to mark
207 * else208 * else
208 * None209 * None
209 * Payload-to-kernel:210 * Payload-to-kernel:
@@ -225,13 +226,13 @@ · 15 unmodified lines
225 * void (*mark_region)(struct dm_dirty_log *log, region_t region);226 * void (*mark_region)(struct dm_dirty_log *log, region_t region);
226 *227 *
227 * Payload-to-userspace:228 * Payload-to-userspace:
228 * uint64_t [] - region(s) to mark229 * __u64 [] - region(s) to mark
229 * Payload-to-kernel:230 * Payload-to-kernel:
230 * None.231 * None.
231 *232 *
232 * Incoming payload contains the one or more regions to mark dirty.233 * Incoming payload contains the one or more regions to mark dirty.
233 * The number of regions contained in the payload can be determined from234 * 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 * When the request has been processed, user-space must return the237 * When the request has been processed, user-space must return the
237 * dm_ulog_request to the kernel - setting the 'error' field and clearing238 * dm_ulog_request to the kernel - setting the 'error' field and clearing
@@ -244,13 +245,13 @@ · 6 unmodified lines
244 * void (*clear_region)(struct dm_dirty_log *log, region_t region);245 * void (*clear_region)(struct dm_dirty_log *log, region_t region);
245 *246 *
246 * Payload-to-userspace:247 * Payload-to-userspace:
247 * uint64_t [] - region(s) to clear248 * __u64 [] - region(s) to clear
248 * Payload-to-kernel:249 * Payload-to-kernel:
249 * None.250 * None.
250 *251 *
251 * Incoming payload contains the one or more regions to mark clean.252 * Incoming payload contains the one or more regions to mark clean.
252 * The number of regions contained in the payload can be determined from253 * 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 * When the request has been processed, user-space must return the256 * When the request has been processed, user-space must return the
256 * dm_ulog_request to the kernel - setting the 'error' field and clearing257 * dm_ulog_request to the kernel - setting the 'error' field and clearing
@@ -266,8 +267,8 @@ · 9 unmodified lines
266 * None.267 * None.
267 * Payload-to-kernel:268 * Payload-to-kernel:
268 * {269 * {
269 * int64_t i; -- 1 if recovery necessary, 0 otherwise270 * __s64 i; -- 1 if recovery necessary, 0 otherwise
270 * uint64_t r; -- The region to recover if i=1271 * __u64 r; -- The region to recover if i=1
271 * }272 * }
272 * 'data_size' should be set appropriately.273 * 'data_size' should be set appropriately.
273 *274 *
@@ -283,8 +284,8 @@ · 9 unmodified lines
283 *284 *
284 * Payload-to-userspace:285 * Payload-to-userspace:
285 * {286 * {
286 * uint64_t - region to set sync state on287 * __u64 - region to set sync state on
287 * int64_t - 0 if not-in-sync, 1 if in-sync288 * __s64 - 0 if not-in-sync, 1 if in-sync
288 * }289 * }
289 * Payload-to-kernel:290 * Payload-to-kernel:
290 * None.291 * None.
@@ -302,7 +303,7 @@ · 11 unmodified lines
302 * Payload-to-userspace:303 * Payload-to-userspace:
303 * None.304 * None.
304 * Payload-to-kernel:305 * Payload-to-kernel:
305 * uint64_t - the number of in-sync regions306 * __u64 - the number of in-sync regions
306 *307 *
307 * No incoming payload. Kernel-bound payload contains the number of308 * No incoming payload. Kernel-bound payload contains the number of
308 * regions that are in-sync (in a size_t).309 * regions that are in-sync (in a size_t).
@@ -350,11 +351,11 @@ · 41 unmodified lines
350 * int (*is_remote_recovering)(struct dm_dirty_log *log, region_t region);351 * int (*is_remote_recovering)(struct dm_dirty_log *log, region_t region);
351 *352 *
352 * Payload-to-userspace:353 * Payload-to-userspace:
353 * uint64_t - region to determine recovery status on354 * __u64 - region to determine recovery status on
354 * Payload-to-kernel:355 * Payload-to-kernel:
355 * {356 * {
356 * int64_t is_recovering; -- 0 if no, 1 if yes357 * __s64 is_recovering; -- 0 if no, 1 if yes
357 * uint64_t in_sync_hint; -- lowest region still needing resync358 * __u64 in_sync_hint; -- lowest region still needing resync
358 * }359 * }
359 *360 *
360 * When the request has been processed, user-space must return the361 * When the request has been processed, user-space must return the
@@ -413,16 +414,16 @@ struct dm_ulog_request { · 52 unmodified lines
413 * differentiate between logs that are being swapped and have the414 * differentiate between logs that are being swapped and have the
414 * same 'uuid'. (Think "live" and "inactive" device-mapper tables.)415 * same 'uuid'. (Think "live" and "inactive" device-mapper tables.)
415 */416 */
416 uint64_t luid;417 __u64 luid;
417 char uuid[DM_UUID_LEN];418 char uuid[DM_UUID_LEN];
418 char padding[3]; /* Padding because DM_UUID_LEN = 129 */419 char padding[3]; /* Padding because DM_UUID_LEN = 129 */
419 420
420 uint32_t version; /* See DM_ULOG_REQUEST_VERSION */421 __u32 version; /* See DM_ULOG_REQUEST_VERSION */
421 int32_t error; /* Used to report back processing errors */422 __s32 error; /* Used to report back processing errors */
422 423
423 uint32_t seq; /* Sequence number for request */424 __u32 seq; /* Sequence number for request */
424 uint32_t request_type; /* DM_ULOG_* defined above */425 __u32 request_type; /* DM_ULOG_* defined above */
425 uint32_t data_size; /* How much data (not including this struct) */426 __u32 data_size; /* How much data (not including this struct) */
426 427
427 char data[0];428 char data[0];
428};429};