diff options
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); |