]> sourceware.org Git - lvm2.git/commitdiff
Require logical volume(s) to be explicitly named for lvconvert --merge.
authorMike Snitzer <snitzer@redhat.com>
Tue, 3 Aug 2010 20:22:31 +0000 (20:22 +0000)
committerMike Snitzer <snitzer@redhat.com>
Tue, 3 Aug 2010 20:22:31 +0000 (20:22 +0000)
WHATS_NEW
test/t-snapshot-merge.sh
tools/lvconvert.c

index 558162759e0ace49c95a7346e5a886c2673af51d..9053a5c783e6fd0dabed43f6ce042c0b868c5c2a 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.73 - 
 ================================
+  Require logical volume(s) to be explicitly named for lvconvert --merge.
   Avoid changing aligned pe_start as a side-effect of very verbose logging.
   Fix 'void*' arithmetic warnings in dbg_malloc.c.
   Fix 'void*' arithmetic warning in some functions from libdm-iface.c.
index 982e065941705b4ffb1fbd01af952b76608074ec..72d96daf201d7a9c005488d76b893e229c179053 100755 (executable)
@@ -49,6 +49,8 @@ setup_merge $vg $lv1
 # now that snapshot LV is created: test if snapshot-merge target is available
 $(dmsetup targets | grep -q snapshot-merge) || exit 200
 lvs -a
+# make sure lvconvert --merge requires explicit LV listing
+not lvconvert --merge 2>err
 lvconvert --merge $vg/$(snap_lv_name_ $lv1)
 lvremove -f $vg/$lv1
 
index ff9bab383aeda97798c88c41b15aad6dcb20c396..1f17619eedd0a690e5e6ed6284fbdce0e0094c6d 100644 (file)
@@ -1738,9 +1738,14 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv)
                return EINVALID_CMD_LINE;
        }
 
-       if (lp.merge)
+       if (lp.merge) {
+               if (!argc) {
+                       log_error("Please provide logical volume path");
+                       return EINVALID_CMD_LINE;
+               }
                return process_each_lv(cmd, argc, argv, READ_FOR_UPDATE, &lp,
                                       &lvconvert_merge_single);
+       }
 
        return lvconvert_single(cmd, &lp);
 }
This page took 0.049969 seconds and 5 git commands to generate.