aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorMilan Broz <gmazyland@gmail.com>2017-01-04 20:23:51 +0100
committerMike Snitzer <snitzer@redhat.com>2017-03-07 13:28:32 -0500
commit9b4b5a797cf8a8d904df979891a8de53f2cb9694 (patch)
treed6d677b0fdb95886d7155d3f58978b4ee8249eec /include/linux/device-mapper.h
parentdm cache: significant rework to leverage dm-bio-prison-v2 (diff)
downloadlinux-dev-9b4b5a797cf8a8d904df979891a8de53f2cb9694.tar.xz
linux-dev-9b4b5a797cf8a8d904df979891a8de53f2cb9694.zip
dm table: add flag to allow target to handle its own integrity metadata
Add DM_TARGET_INTEGRITY flag that specifies bio integrity metadata is not inherited but implemented in the target itself. Signed-off-by: Milan Broz <gmazyland@gmail.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index a7e6903866fd..874462153f14 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -221,6 +221,12 @@ struct target_type {
*/
typedef unsigned (*dm_num_write_bios_fn) (struct dm_target *ti, struct bio *bio);
+/*
+ * A target implements own bio data integrity.
+ */
+#define DM_TARGET_INTEGRITY 0x00000010
+#define dm_target_has_integrity(type) ((type)->features & DM_TARGET_INTEGRITY)
+
struct dm_target {
struct dm_table *table;
struct target_type *type;