summaryrefslogtreecommitdiff
path: root/libdm/libdevmapper.h
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2017-03-21 18:17:42 +0100
committerHeinz Mauelshagen <heinzm@redhat.com>2017-03-21 18:17:42 +0100
commit1e4462dbfbd2bbe3590936df24b3ccd83110b158 (patch)
tree99fd297e0b12b96585b66e5f105c8fed1dd55ec8 /libdm/libdevmapper.h
parent642d682d8ddcc3152f68b3ec8518902a0ef448ac (diff)
downloadlvm2-1e4462dbfbd2bbe3590936df24b3ccd83110b158.tar.gz
raid: adjust to misordered raid table line output
The libdevmapper interface compares existing table line retrieved from the kernel to new table line created to decide if it can suppress a reload. Any difference between input and output of the table line is taken to be a change thus causing a table reload. The dm-raid target started to misorder the raid parameters (e.g. 'raid10_copies') starting with dm-raid target version 1.9.0 up to (excluding) 1.11.0. This causes runtime failures (limited to raid10 as of tests) and needs to be reversed to allow e.g. old lvm2 uspace to run properly. Check for the aforementioned version range and adjust creation of the table line to the respective (mis)ordered sequence inside and correct order outside the range (as described for the raid target in the kernels Documentation/device-mapper/dm-raid.txt).
Diffstat (limited to 'libdm/libdevmapper.h')
-rw-r--r--libdm/libdevmapper.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 4bd32b4e1..ff8478551 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -1775,6 +1775,16 @@ int dm_tree_node_add_mirror_target(struct dm_tree_node *node,
#define DM_BLOCK_ON_ERROR 0x00000004 /* On error, suspend I/O */
#define DM_CORELOG 0x00000008 /* In-memory log */
+/*
+ * RAID flag: table line is in kernel documented order.
+ *
+ * Target version >= 1.9.0 and < 1.11.0 misordered e.g. 'raid10_copies'
+ *
+ * Keep distinct from mirror log ones above because it
+ * can be passed together with those in load segment flags!
+ */
+#define DM_RAID_TABLE_ORDERED 0x00000010
+
int dm_tree_node_add_mirror_target_log(struct dm_tree_node *node,
uint32_t region_size,
unsigned clustered,