1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-30 01:47:56 +03:00

locking: exclusive can be either remote or local

When LOCK is exclusive and LV is already locally active,
it cannot be active remotely.
This commit is contained in:
Zdenek Kabelac 2018-02-14 23:06:49 +01:00
parent a1195aaa66
commit a2d2fe3a8c
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.178 -
=====================================
Do not report LV as remotely active when it's locally exclusive in cluster.
Add deprecate messages for usage of mirrors with mirrorlog.
Separate reporting of monitoring status and error status.
Improve validation of created strings in vgimportclone.

View File

@ -1543,8 +1543,11 @@ static int _lv_is_active(const struct logical_volume *lv,
if (skip_cluster_query)
goto out;
if ((r = cluster_lock_held(lv->lvid.s, "", &e)) >= 0)
if ((r = cluster_lock_held(lv->lvid.s, "", &e)) >= 0) {
if (l && e)
r = 0; /* exclusive locally */
goto out;
}
/*
* If lock query is not supported (due to interfacing with old