]> sourceware.org Git - lvm2.git/commitdiff
lvconvert: --trackchanges requires --splitmirrors 1
authorAlasdair G Kergon <agk@redhat.com>
Mon, 25 Jul 2016 20:15:25 +0000 (21:15 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Mon, 25 Jul 2016 20:15:25 +0000 (21:15 +0100)
WHATS_NEW
tools/lvconvert.c

index b80d18978123d68e058d4217ebf448e96facabb6..c96b5be2b892ec0b2867864a5f1a9b5d7a899fe2 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,6 @@
 Version 2.02.162 - 
 =================================
-  Improve lvconvert --trackchanges validation to require --splitmirrors.
+  Improve lvconvert --trackchanges validation to require --splitmirrors 1.
   Add note about lastlog built-in command to lvm man page.
   Fix unrecognised segtype flag message.
   lvconvert reuse cachepool metadade now ONLY with -Zn and clear otherwise.
index 91765d636855d7246d03714fa43dcd20748aa971..c0838d18c857693fe25431988357b9677c2b066d 100644 (file)
@@ -1894,6 +1894,13 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
                                  lp->keep_mimages ? "split" : "reduce");
                        return 0;
                }
+
+               /* --trackchanges requires --splitmirrors which always has SIGN_MINUS */
+               if (lp->track_changes && lp->mirrors != 1) {
+                        log_error("Exactly one image must be split off from %s when tracking changes.",
+                                 display_lvname(lv));
+                        return 0;
+                }
        }
 
        if (lp->merge_mirror)
@@ -1903,8 +1910,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l
                return lv_raid_split_and_track(lv, lp->pvh);
 
        if (lp->keep_mimages)
-               return lv_raid_split(lv, lp->lv_split_name,
-                                    image_count, lp->pvh);
+               return lv_raid_split(lv, lp->lv_split_name, image_count, lp->pvh);
 
        if (lp->mirrors_supplied)
                return lv_raid_change_image_count(lv, image_count, lp->pvh);
This page took 0.051679 seconds and 5 git commands to generate.