diff --git a/WHATS_NEW b/WHATS_NEW index 558162759..9053a5c78 100644 --- 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. diff --git a/test/t-snapshot-merge.sh b/test/t-snapshot-merge.sh index 982e06594..72d96daf2 100755 --- a/test/t-snapshot-merge.sh +++ b/test/t-snapshot-merge.sh @@ -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 diff --git a/tools/lvconvert.c b/tools/lvconvert.c index ff9bab383..1f17619ee 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -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); }