1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

lvconvert: improve merge validation

Easier check for conflicting options with --merge.
This commit is contained in:
Zdenek Kabelac 2014-07-17 15:38:13 +02:00
parent 7abad9ef88
commit 8f9f180139
2 changed files with 7 additions and 9 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.108 - Version 2.02.108 -
================================= =================================
Improve lvconvert --merge validation.
Improve lvconvert --splitsnapshot validation. Improve lvconvert --splitsnapshot validation.
Add report/list_item_separator lvm.conf option. Add report/list_item_separator lvm.conf option.
Add lv_active_{locally,remotely,exclusively} LV reporting fields. Add lv_active_{locally,remotely,exclusively} LV reporting fields.

View File

@ -523,15 +523,12 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
/* There are six types of lvconvert. */ /* There are six types of lvconvert. */
if (lp->merge) { /* Snapshot merge */ if (lp->merge) { /* Snapshot merge */
if (arg_count(cmd, regionsize_ARG) || arg_count(cmd, chunksize_ARG) || if (!arg_is_only_set(cmd, "cannot be used with --merge",
arg_count(cmd, zero_ARG) || arg_count(cmd, regionsize_ARG) || merge_ARG,
arg_count(cmd, poolmetadata_ARG) || arg_count(cmd, poolmetadatasize_ARG) || background_ARG, interval_ARG,
arg_count(cmd, readahead_ARG) || force_ARG, noudevsync_ARG, test_ARG,
arg_count(cmd, stripes_long_ARG) || arg_count(cmd, stripesize_ARG)) { -1))
log_error("Only --background and --interval are valid " return_0;
"arguments for snapshot merge");
return 0;
}
if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot"))) if (!(lp->segtype = get_segtype_from_string(cmd, "snapshot")))
return_0; return_0;