]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/device-mapper.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[karo-tx-linux.git] / include / linux / device-mapper.h
index 751ce21dea7b539a95b79d0e0a57da8528fb455f..2970022faa632715461ab11ea8955cf3aa0fb1c0 100644 (file)
@@ -398,6 +398,12 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
 #define dm_array_too_big(fixed, obj, num) \
        ((num) > (UINT_MAX - (fixed)) / (obj))
 
+/*
+ * Sector offset taken relative to the start of the target instead of
+ * relative to the start of the device.
+ */
+#define dm_target_offset(ti, sector) ((sector) - (ti)->begin)
+
 static inline sector_t to_sector(unsigned long n)
 {
        return (n >> SECTOR_SHIFT);