diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 13:16:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-12 13:16:46 -0400 |
commit | 8357422d4bf33bc2c35884d4016c3fc9efbbc1d2 (patch) | |
tree | 5779dfe36de828d3ef2dacfda48b7961cdc44525 /include | |
parent | 1021a645344d4a77333e19e60d37b9343be0d7b7 (diff) | |
parent | 959eb4e5592cc0b0b07db0ca30d2b1efd790020f (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: (33 commits)
dm mpath: support discard
dm stripe: support discards
dm: split discard requests on target boundaries
dm stripe: optimize sector division
dm stripe: move sector translation to a function
dm: error return error for discards
dm delay: support discard
dm: zero silently drop discards
dm: use dm_target_offset macro
dm: factor out max_io_len_target_boundary
dm: use common __issue_target_request for flush and discard support
dm: linear support discard
dm crypt: simplify crypt_ctr
dm crypt: simplify crypt_config destruction logic
dm: allow autoloading of dm mod
dm: rename map_info flush_request to target_request_nr
dm ioctl: refactor dm_table_complete
dm snapshot: implement merge
dm: do not initialise full request queue when bio based
dm ioctl: make bio or request based device type immutable
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device-mapper.h | 16 | ||||
-rw-r--r-- | include/linux/dm-ioctl.h | 5 | ||||
-rw-r--r-- | include/linux/miscdevice.h | 1 |
3 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 1381cd97b4ed..2970022faa63 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -22,7 +22,7 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | |||
22 | union map_info { | 22 | union map_info { |
23 | void *ptr; | 23 | void *ptr; |
24 | unsigned long long ll; | 24 | unsigned long long ll; |
25 | unsigned flush_request; | 25 | unsigned target_request_nr; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | /* | 28 | /* |
@@ -174,12 +174,18 @@ struct dm_target { | |||
174 | * A number of zero-length barrier requests that will be submitted | 174 | * A number of zero-length barrier requests that will be submitted |
175 | * to the target for the purpose of flushing cache. | 175 | * to the target for the purpose of flushing cache. |
176 | * | 176 | * |
177 | * The request number will be placed in union map_info->flush_request. | 177 | * The request number will be placed in union map_info->target_request_nr. |
178 | * It is a responsibility of the target driver to remap these requests | 178 | * It is a responsibility of the target driver to remap these requests |
179 | * to the real underlying devices. | 179 | * to the real underlying devices. |
180 | */ | 180 | */ |
181 | unsigned num_flush_requests; | 181 | unsigned num_flush_requests; |
182 | 182 | ||
183 | /* | ||
184 | * The number of discard requests that will be submitted to the | ||
185 | * target. map_info->request_nr is used just like num_flush_requests. | ||
186 | */ | ||
187 | unsigned num_discard_requests; | ||
188 | |||
183 | /* target specific data */ | 189 | /* target specific data */ |
184 | void *private; | 190 | void *private; |
185 | 191 | ||
@@ -392,6 +398,12 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size); | |||
392 | #define dm_array_too_big(fixed, obj, num) \ | 398 | #define dm_array_too_big(fixed, obj, num) \ |
393 | ((num) > (UINT_MAX - (fixed)) / (obj)) | 399 | ((num) > (UINT_MAX - (fixed)) / (obj)) |
394 | 400 | ||
401 | /* | ||
402 | * Sector offset taken relative to the start of the target instead of | ||
403 | * relative to the start of the device. | ||
404 | */ | ||
405 | #define dm_target_offset(ti, sector) ((sector) - (ti)->begin) | ||
406 | |||
395 | static inline sector_t to_sector(unsigned long n) | 407 | static inline sector_t to_sector(unsigned long n) |
396 | { | 408 | { |
397 | return (n >> SECTOR_SHIFT); | 409 | return (n >> SECTOR_SHIFT); |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 2c445e113790..49eab360d5d4 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
13 | #define DM_DIR "mapper" /* Slashes not supported */ | 13 | #define DM_DIR "mapper" /* Slashes not supported */ |
14 | #define DM_CONTROL_NODE "control" | ||
14 | #define DM_MAX_TYPE_NAME 16 | 15 | #define DM_MAX_TYPE_NAME 16 |
15 | #define DM_NAME_LEN 128 | 16 | #define DM_NAME_LEN 128 |
16 | #define DM_UUID_LEN 129 | 17 | #define DM_UUID_LEN 129 |
@@ -266,9 +267,9 @@ enum { | |||
266 | #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) |
267 | 268 | ||
268 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
269 | #define DM_VERSION_MINOR 17 | 270 | #define DM_VERSION_MINOR 18 |
270 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
271 | #define DM_VERSION_EXTRA "-ioctl (2010-03-05)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2010-06-29)" |
272 | 273 | ||
273 | /* Status bits */ | 274 | /* Status bits */ |
274 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index f6c9b7dcb9fd..bafffc737903 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #define KVM_MINOR 232 | 38 | #define KVM_MINOR 232 |
39 | #define BTRFS_MINOR 234 | 39 | #define BTRFS_MINOR 234 |
40 | #define AUTOFS_MINOR 235 | 40 | #define AUTOFS_MINOR 235 |
41 | #define MAPPER_CTRL_MINOR 236 | ||
41 | #define MISC_DYNAMIC_MINOR 255 | 42 | #define MISC_DYNAMIC_MINOR 255 |
42 | 43 | ||
43 | struct device; | 44 | struct device; |