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/linux/device-mapper.h | |
| 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/linux/device-mapper.h')
| -rw-r--r-- | include/linux/device-mapper.h | 16 |
1 files changed, 14 insertions, 2 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); |
