diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/device-mapper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 751ce21dea7b..2970022faa63 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -398,6 +398,12 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size); | |||
| 398 | #define dm_array_too_big(fixed, obj, num) \ | 398 | #define dm_array_too_big(fixed, obj, num) \ |
| 399 | ((num) > (UINT_MAX - (fixed)) / (obj)) | 399 | ((num) > (UINT_MAX - (fixed)) / (obj)) |
| 400 | 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 | |||
| 401 | static inline sector_t to_sector(unsigned long n) | 407 | static inline sector_t to_sector(unsigned long n) |
| 402 | { | 408 | { |
| 403 | return (n >> SECTOR_SHIFT); | 409 | return (n >> SECTOR_SHIFT); |
