mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Allow implicit "convert" to the same lock mode.
(Code already not fail if unlocking not locked resource.) This is needed in pre/post lock_lv call, where we can request the same lock on local node becuase of suspend call.
This commit is contained in:
parent
cc31b2bd3f
commit
4499aa2ea5
@ -1,5 +1,6 @@
|
||||
Version 2.02.57 -
|
||||
====================================
|
||||
Allow implicit convert to the same cluster lock mode.
|
||||
Replace magic masks in cluster locking code by defined masks.
|
||||
Remove log volume from metadata if initial deactivation fails.
|
||||
Give better error message for pvmove when all data is skipped.
|
||||
|
@ -245,6 +245,11 @@ int hold_lock(char *resource, int mode, int flags)
|
||||
|
||||
lvi = lookup_info(resource);
|
||||
|
||||
if (lvi && lvi->lock_mode == mode) {
|
||||
DEBUGLOG("hold_lock, lock mode %d already held\n", mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Only allow explicit conversions */
|
||||
if (lvi && !(flags & LKF_CONVERT)) {
|
||||
errno = EBUSY;
|
||||
|
Loading…
Reference in New Issue
Block a user