1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-30 05:49:28 +03:00

raid: conditionally reject convert to striped/raid; fix

Fix a logic flaw introduced in commit 17bee733d1
preventing e.g. striped -> raid5 conversions.

Related: rhbz1191935
Related: rhbz1366296
This commit is contained in:
Heinz Mauelshagen
2017-03-17 16:03:35 +01:00
parent 6ebf39da91
commit 17a8f3d6f0

View File

@ -6017,7 +6017,7 @@ int lv_raid_convert(struct logical_volume *lv,
}
/* Prohibit any takeover in case sub LVs to be removed still exist after a previous reshape */
if (_get_available_removed_sublvs(lv, &available_slvs, &removed_slvs))
if (!_get_available_removed_sublvs(lv, &available_slvs, &removed_slvs))
return 0;
if (removed_slvs) {
log_error("Can't convert %s LV %s to %s containing sub LVs to remove after a reshape.",