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=321b761d3641e38bec125af789e11466aa9407ae
Commit:        321b761d3641e38bec125af789e11466aa9407ae
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:15:54 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.

---
 lib/metadata/raid_manip.c               |    2 +-
 test/shell/lvconvert-raid5_to_raid10.sh |   63 +++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 1 deletions(-)
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