diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:30:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:30:47 -0500 |
commit | f6bcfd94c0a97c11ce9197ade93a08bc8af6e057 (patch) | |
tree | 83d867565b4f2a7627b3288f9e000eaf2b217be9 /include/linux | |
parent | 509e4aef44eb10e4aef1f81c3c3ff1214671503b (diff) | |
parent | 9d09e663d5502c46f2d9481c04c1087e1c2da698 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (32 commits)
dm: raid456 basic support
dm: per target unplug callback support
dm: introduce target callbacks and congestion callback
dm mpath: delay activate_path retry on SCSI_DH_RETRY
dm: remove superfluous irq disablement in dm_request_fn
dm log: use PTR_ERR value instead of ENOMEM
dm snapshot: avoid storing private suspended state
dm snapshot: persistent make metadata_wq multithreaded
dm: use non reentrant workqueues if equivalent
dm: convert workqueues to alloc_ordered
dm stripe: switch from local workqueue to system_wq
dm: dont use flush_scheduled_work
dm snapshot: remove unused dm_snapshot queued_bios_work
dm ioctl: suppress needless warning messages
dm crypt: add loop aes iv generator
dm crypt: add multi key capability
dm crypt: add post iv call to iv generator
dm crypt: use io thread for reads only if mempool exhausted
dm crypt: scale to multiple cpus
dm crypt: simplify compatible table output
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/device-mapper.h | 12 | ||||
-rw-r--r-- | include/linux/dm-ioctl.h | 14 | ||||
-rw-r--r-- | include/linux/dm-log-userspace.h | 13 |
3 files changed, 34 insertions, 5 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 2970022faa63..272496d1fae4 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -193,6 +193,13 @@ struct dm_target { | |||
193 | char *error; | 193 | char *error; |
194 | }; | 194 | }; |
195 | 195 | ||
196 | /* Each target can link one of these into the table */ | ||
197 | struct dm_target_callbacks { | ||
198 | struct list_head list; | ||
199 | int (*congested_fn) (struct dm_target_callbacks *, int); | ||
200 | void (*unplug_fn)(struct dm_target_callbacks *); | ||
201 | }; | ||
202 | |||
196 | int dm_register_target(struct target_type *t); | 203 | int dm_register_target(struct target_type *t); |
197 | void dm_unregister_target(struct target_type *t); | 204 | void dm_unregister_target(struct target_type *t); |
198 | 205 | ||
@@ -269,6 +276,11 @@ int dm_table_add_target(struct dm_table *t, const char *type, | |||
269 | sector_t start, sector_t len, char *params); | 276 | sector_t start, sector_t len, char *params); |
270 | 277 | ||
271 | /* | 278 | /* |
279 | * Target_ctr should call this if it needs to add any callbacks. | ||
280 | */ | ||
281 | void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb); | ||
282 | |||
283 | /* | ||
272 | * Finally call this to make the table ready for use. | 284 | * Finally call this to make the table ready for use. |
273 | */ | 285 | */ |
274 | int dm_table_complete(struct dm_table *t); | 286 | int dm_table_complete(struct dm_table *t); |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 49eab360d5d4..78bbf47bbb96 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -44,7 +44,7 @@ | |||
44 | * Remove a device, destroy any tables. | 44 | * Remove a device, destroy any tables. |
45 | * | 45 | * |
46 | * DM_DEV_RENAME: | 46 | * DM_DEV_RENAME: |
47 | * Rename a device. | 47 | * Rename a device or set its uuid if none was previously supplied. |
48 | * | 48 | * |
49 | * DM_SUSPEND: | 49 | * DM_SUSPEND: |
50 | * This performs both suspend and resume, depending which flag is | 50 | * This performs both suspend and resume, depending which flag is |
@@ -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 18 | 270 | #define DM_VERSION_MINOR 19 |
271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 1 |
272 | #define DM_VERSION_EXTRA "-ioctl (2010-06-29)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2011-01-07)" |
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 */ |
@@ -322,4 +322,10 @@ enum { | |||
322 | */ | 322 | */ |
323 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ | 323 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ |
324 | 324 | ||
325 | /* | ||
326 | * If set, rename changes the uuid not the name. Only permitted | ||
327 | * if no uuid was previously supplied: an existing uuid cannot be changed. | ||
328 | */ | ||
329 | #define DM_UUID_FLAG (1 << 14) /* In */ | ||
330 | |||
325 | #endif /* _LINUX_DM_IOCTL_H */ | 331 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/linux/dm-log-userspace.h b/include/linux/dm-log-userspace.h index 0c3c3a2110c4..eeace7d3ff15 100644 --- a/include/linux/dm-log-userspace.h +++ b/include/linux/dm-log-userspace.h | |||
@@ -370,6 +370,16 @@ | |||
370 | #define DM_ULOG_REQUEST_TYPE(request_type) \ | 370 | #define DM_ULOG_REQUEST_TYPE(request_type) \ |
371 | (DM_ULOG_REQUEST_MASK & (request_type)) | 371 | (DM_ULOG_REQUEST_MASK & (request_type)) |
372 | 372 | ||
373 | /* | ||
374 | * DM_ULOG_REQUEST_VERSION is incremented when there is a | ||
375 | * change to the way information is passed between kernel | ||
376 | * and userspace. This could be a structure change of | ||
377 | * dm_ulog_request or a change in the way requests are | ||
378 | * issued/handled. Changes are outlined here: | ||
379 | * version 1: Initial implementation | ||
380 | */ | ||
381 | #define DM_ULOG_REQUEST_VERSION 1 | ||
382 | |||
373 | struct dm_ulog_request { | 383 | struct dm_ulog_request { |
374 | /* | 384 | /* |
375 | * The local unique identifier (luid) and the universally unique | 385 | * The local unique identifier (luid) and the universally unique |
@@ -383,8 +393,9 @@ struct dm_ulog_request { | |||
383 | */ | 393 | */ |
384 | uint64_t luid; | 394 | uint64_t luid; |
385 | char uuid[DM_UUID_LEN]; | 395 | char uuid[DM_UUID_LEN]; |
386 | char padding[7]; /* Padding because DM_UUID_LEN = 129 */ | 396 | char padding[3]; /* Padding because DM_UUID_LEN = 129 */ |
387 | 397 | ||
398 | uint32_t version; /* See DM_ULOG_REQUEST_VERSION */ | ||
388 | int32_t error; /* Used to report back processing errors */ | 399 | int32_t error; /* Used to report back processing errors */ |
389 | 400 | ||
390 | uint32_t seq; /* Sequence number for request */ | 401 | uint32_t seq; /* Sequence number for request */ |