mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-08 08:58:50 +03:00
activation: move check later
Check for lv when it's known in all cases.
This commit is contained in:
parent
e16d309d56
commit
f3c75bb201
@ -2568,6 +2568,12 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
|
|||||||
struct lvinfo info;
|
struct lvinfo info;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
|
||||||
|
if (!activation())
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (!lv && !(lv_to_free = lv = lv_from_lvid(cmd, lvid_s, 0)))
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (!laopts->exclusive &&
|
if (!laopts->exclusive &&
|
||||||
(lv_is_origin(lv) ||
|
(lv_is_origin(lv) ||
|
||||||
lv_is_pvmove(lv) ||
|
lv_is_pvmove(lv) ||
|
||||||
@ -2578,12 +2584,6 @@ static int _lv_activate(struct cmd_context *cmd, const char *lvid_s,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!activation())
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (!lv && !(lv_to_free = lv = lv_from_lvid(cmd, lvid_s, 0)))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (filter && !_passes_activation_filter(cmd, lv)) {
|
if (filter && !_passes_activation_filter(cmd, lv)) {
|
||||||
log_verbose("Not activating %s since it does not pass "
|
log_verbose("Not activating %s since it does not pass "
|
||||||
"activation filter.", display_lvname(lv));
|
"activation filter.", display_lvname(lv));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user