mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
vgchange: move detection of remote exlusivness
Since activation takes only read-lock, there could be multiple activation running in parallel. So instead of checking before taking any real lock, let the locking resolve the problem and just detect if the reason for failure has been remote exlusive activation. It should be also faster, since each activation does not need to do explicit lock query.
This commit is contained in:
parent
28939dba09
commit
598c82fc07
@ -1,5 +1,6 @@
|
||||
Version 2.02.105 -
|
||||
=====================================
|
||||
Test for remote exclusive activation after activation fails.
|
||||
Support lvconvert --merge for thin snapshots.
|
||||
Add support to read thin device id from table line entry.
|
||||
Drop extra test for origin when testing merging origin in lv_refresh().
|
||||
|
@ -121,16 +121,6 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
||||
((lv->status & PVMOVE) ))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* If the LV is active exclusive remotely,
|
||||
* then ignore it here
|
||||
*/
|
||||
if (lv_is_active_exclusive_remotely(lv)) {
|
||||
log_verbose("%s/%s is exclusively active on"
|
||||
" a remote node", vg->name, lv->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lv_activation_skip(lv, activate, arg_count(cmd, ignoreactivationskip_ARG), 0)) {
|
||||
log_verbose("ACTIVATION_SKIP flag set for LV %s/%s, skipping activation.",
|
||||
lv->vg->name, lv->name);
|
||||
@ -144,7 +134,17 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
||||
expected_count++;
|
||||
|
||||
if (!lv_change_activate(cmd, lv, activate)) {
|
||||
stack;
|
||||
if (!lv_is_active_exclusive_remotely(lv))
|
||||
stack;
|
||||
else {
|
||||
/*
|
||||
* If the LV is active exclusive remotely,
|
||||
* then ignore it here
|
||||
*/
|
||||
log_verbose("%s/%s is exclusively active on"
|
||||
" a remote node", vg->name, lv->name);
|
||||
expected_count--; /* not accounted */
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user