master - lvconvert: Provide entry point for new functionality.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8b1a368b59f0759dca84be663663011622b0cd99 Commit: 8b1a368b59f0759dca84be663663011622b0cd99 Parent: fdc3fcbfceb6282312e79200286be29ae08a5765 Author: Alasdair G Kergon <[email protected]> AuthorDate: Wed Aug 3 03:53:29 2016 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Wed Aug 3 03:53:29 2016 +0100
lvconvert: Provide entry point for new functionality.
Prepare for new segment type conversion functionality in cases that currently fail. In the short-term, we need to do this while limiting the changes to the code paths for the conversions that are already supported.
--- tools/lvconvert.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
tools/lvconvert.c +8 -3
@@ -1839,7 +1839,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *lif (lp->mirrors_supplied && !seg_is_mirrored (seg) && !seg_is_linear (seg)) {log_error ("'--mirrors/-m' is not compatible with %s." ,lvseg_name (seg)); -return 0 ; + goto try_new_takeover_or_reshape; }if (!_lvconvert_validate_thin (lv, lp))
@@ -1849,12 +1849,12 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *llog_error ("Unable to convert %s from %s to %s." ,display_lvname (lv),lvseg_name (seg), lp->segtype->name); -return 0 ; + goto try_new_takeover_or_reshape; }if (seg_is_linear (seg) && !lp->merge_mirror && !lp->mirrors_supplied) {log_error ("Raid conversions require -m/--mirrors." ); -return 0 ; + goto try_new_takeover_or_reshape; }/* Change number of RAID1 images */
@@ -1965,6 +1965,11 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *llog_error ("Conversion operation not yet supported." ); +try_new_takeover_or_reshape: + ; + +/* FIXME New takeover and reshape code is called from here */ +return 0 ; }