1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-22 19:33:16 +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

@@ -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