diff options
author | Alasdair G Kergon <agk@redhat.com> | 2016-08-03 03:53:29 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2016-08-03 03:53:29 +0100 |
commit | 8b1a368b59f0759dca84be663663011622b0cd99 (patch) | |
tree | 3cc6ad4a7bb4c162cff97bbee2d0ec6e2de062b0 | |
parent | fdc3fcbfceb6282312e79200286be29ae08a5765 (diff) | |
download | lvm2-8b1a368b59f0759dca84be663663011622b0cd99.tar.gz |
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.
-rw-r--r-- | tools/lvconvert.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c index d5eaee430..b36504996 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1839,7 +1839,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l if (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 *l log_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 *l log_error("Conversion operation not yet supported."); +try_new_takeover_or_reshape: + ; + + /* FIXME New takeover and reshape code is called from here */ + return 0; } |