Blame SOURCES/lvm2-2_02_187-raid-more-limitted-prohibition-of-stacked-raid-usage.patch

b83e05
 lib/metadata/raid_manip.c | 13 +++++++------
b83e05
 1 file changed, 7 insertions(+), 6 deletions(-)
b83e05
b83e05
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
b83e05
index 768f261..7481ebf 100644
b83e05
--- a/lib/metadata/raid_manip.c
b83e05
+++ b/lib/metadata/raid_manip.c
b83e05
@@ -6217,6 +6217,13 @@ static int _set_convenient_raid145610_segtype_to(const struct lv_segment *seg_fr
b83e05
 	if (seg_flag) {
b83e05
 		if (!(*segtype = get_segtype_from_flag(cmd, seg_flag)))
b83e05
 			return_0;
b83e05
+
b83e05
+		/* FIXME Can't reshape volume in use - aka not toplevel devices */
b83e05
+		if (!dm_list_empty(&seg_from->lv->segs_using_this_lv)) {
b83e05
+			log_error("Can't reshape stacked volume %s.", display_lvname(seg_from->lv));
b83e05
+			return 0;
b83e05
+		}
b83e05
+
b83e05
 		if (segtype_sav != *segtype) {
b83e05
 			log_warn("Replaced LV type %s%s with possible type %s.",
b83e05
 				 segtype_sav->name, _get_segtype_alias_str(seg_from->lv, segtype_sav),
b83e05
@@ -6445,12 +6452,6 @@ int lv_raid_convert(struct logical_volume *lv,
b83e05
 	uint32_t available_slvs, removed_slvs;
b83e05
 	takeover_fn_t takeover_fn;
b83e05
 
b83e05
-	/* FIXME Can't reshape volume in use - aka not toplevel devices */
b83e05
-	if (!dm_list_empty(&lv->segs_using_this_lv)) {
b83e05
-		log_error("Can't reshape stacked volume %s.", display_lvname(lv));
b83e05
-		return 0;
b83e05
-	}
b83e05
-
b83e05
 	/* FIXME If not active, prompt and activate */
b83e05
 	/* FIXME Some operations do not require the LV to be active */
b83e05
 	/* LV must be active to perform raid conversion operations */