Skip to contentSkip to conversation

master - lvconvert: add infrastructure for RaidLV reshaping support

PATCH Heinz Mauelshagen 1 participant 1 message Feb 24, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f79bd30a8be0d189c417a76d1ca6b64f70a8832e
Commit:        f79bd30a8be0d189c417a76d1ca6b64f70a8832e
Parent:        1784cc990e6941e93cfcf1204526cec75d287a89
Author:        Heinz Mauelshagen <[email protected]>
AuthorDate:    Fri Feb 24 04:00:17 2017 +0100
Committer:     Heinz Mauelshagen <[email protected]>
CommitterDate: Fri Feb 24 05:20:58 2017 +0100

lvconvert: add infrastructure for RaidLV reshaping support

In order to support striped raid5/6/10 LV reshaping (change of LV type, stripesize or number of legs), this patch introduces more local infrastructure to raid_manip.c used by followup patches.

Change:
- allow raid_rimage_extents() to calculate raid10
- remove an __unused__ attribute

Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978

---
 lib/metadata/raid_manip.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
lib/metadata/raid_manip.c +1 -3
index 40bc45e..c465bd4 100644
@@ -1135,8 +1135,7 @@ uint32_t raid_rimage_extents(const struct segment_type *segtype,
 	uint64_t r;
 
 	if (!extents ||
-	    segtype_is_mirror(segtype) ||
-	    segtype_is_raid1(segtype))
+	    segtype_is_striped_raid(segtype))
 		return extents;
 
 	r = extents;
@@ -1576,7 +1575,6 @@ static int _lv_free_reshape_space_with_status(struct logical_volume *lv, enum al
 	return 1;
 }
 
-__attribute__ ((__unused__))
 static int _lv_free_reshape_space(struct logical_volume *lv)
 {
 	return _lv_free_reshape_space_with_status(lv, NULL);