mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
lvconvert: relocate mirror tests
This commit is contained in:
parent
1931d1e58e
commit
04b8e55f2a
@ -236,6 +236,18 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
|
||||
if (!_check_conversion_type(cmd, type_str))
|
||||
return_0;
|
||||
|
||||
if (arg_count(cmd, repair_ARG) &&
|
||||
!arg_is_only_set(cmd, "cannot be used with --repair",
|
||||
repair_ARG,
|
||||
stripes_long_ARG, stripesize_ARG,
|
||||
-1))
|
||||
return_0;
|
||||
|
||||
if (arg_is_set(cmd, mirrorlog_ARG) && arg_is_set(cmd, corelog_ARG)) {
|
||||
log_error("--mirrorlog and --corelog are incompatible.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arg_count(cmd, splitsnapshot_ARG))
|
||||
lp->splitsnapshot = 1;
|
||||
|
||||
@ -1273,19 +1285,6 @@ static int _lvconvert_mirrors_parse_params(struct cmd_context *cmd,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((arg_count(cmd, mirrors_ARG) && repair) ||
|
||||
(arg_count(cmd, mirrorlog_ARG) && repair) ||
|
||||
(arg_count(cmd, corelog_ARG) && repair)) {
|
||||
log_error("--repair cannot be used with --mirrors, --mirrorlog,"
|
||||
" or --corelog");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (arg_count(cmd, mirrorlog_ARG) && arg_count(cmd, corelog_ARG)) {
|
||||
log_error("--mirrorlog and --corelog are incompatible");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjusting mimage count?
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user