Skip to contentSkip to conversation

master - raid: support raid5_n convenience type on conversion to raid10

PATCH Heinz Mauelshagen 1 participant 1 message Mar 9, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dd88a0f05cb27d54aa74960bbe9370fa37197cdc
Commit:        dd88a0f05cb27d54aa74960bbe9370fa37197cdc
Parent:        6cb2c35d1654558efc1b37ca44d77f83682446c7
Author:        Heinz Mauelshagen <[email protected]>
AuthorDate:    Fri Mar 9 21:15:41 2018 +0100
Committer:     Heinz Mauelshagen <[email protected]>
CommitterDate: Fri Mar 9 21:23:16 2018 +0100

raid: support raid5_n convenience type on conversion to raid10

Fix requesting a conversion on raid5_{ls,rs,la,ra} -> raid10 not offering offering interim convenience type raid5_n.

Resolves: rhbz1468600

---
 WHATS_NEW                               |    1 +
 lib/metadata/raid_manip.c               |    2 +-
 test/shell/lvconvert-raid5_to_raid10.sh |   63 +++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index 16ad1d9..40f81f5 100644
@@ -1,5 +1,6 @@
 Version 2.02.178 - 
 =====================================
+  Offer convenience type raid5_n converting to raid10
   Automatically avoid reading invalid snapshots during device scan.
   Ensure COW device is writable even for read-only thick snapshots.
   Support activation of component LVs in read-only mode.
lib/metadata/raid_manip.c +1 -1
index 0f56120..7d82a24 100644
@@ -6119,7 +6119,7 @@ static int _set_convenient_raid145610_segtype_to(const struct lv_segment *seg_fr
 				return 0;
 			}
 
-			seg_flag = SEG_RAID0_META;
+			seg_flag = seg_is_raid5_n(seg_from) ? SEG_RAID0_META : SEG_RAID5_N;
 
 		} else if (segtype_is_any_raid6(*segtype)) {
 			if (seg_from->area_count < 4) {
test/shell/lvconvert-raid5_to_raid10.sh new file +63 -0

63 lines not on this page · raw message