master - raid: conditionally reject convert to striped/raid; fix
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=17a8f3d6f0fa26ab01d974af409d1d075d5815a0 Commit: 17a8f3d6f0fa26ab01d974af409d1d075d5815a0 Parent: 6ebf39da91678238ebea4f13cb1252bbc70238c5 Author: Heinz Mauelshagen <[email protected]> AuthorDate: Fri Mar 17 16:03:35 2017 +0100 Committer: Heinz Mauelshagen <[email protected]> CommitterDate: Fri Mar 17 16:03:35 2017 +0100
raid: conditionally reject convert to striped/raid; fix
Fix a logic flaw introduced in commit 17bee733d16e preventing e.g. striped -> raid5 conversions.
Related: rhbz1191935
Related: rhbz1366296
--- lib/metadata/raid_manip.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/metadata/raid_manip.c +1 -1
@@ -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.",