mirror of
git://sourceware.org/git/lvm2.git
synced 2025-04-01 18:50:41 +03:00
Avoid unnecessary unlock attempts with LCK_CACHE pseudo-locks.
This commit is contained in:
parent
3835ad6b1c
commit
1a20d53171
@ -5,6 +5,7 @@ Version 2.02.38 -
|
||||
|
||||
Version 2.02.37 -
|
||||
=================================
|
||||
Avoid unnecessary unlock attempts with LCK_CACHE pseudo-locks.
|
||||
When asked to drop cached committed VG metadata, invalidate cached PV labels.
|
||||
Drop metadata cache before writing precommitted metadata instead of after.
|
||||
Don't touch /dev in vgrename if activation is disabled.
|
||||
|
@ -370,8 +370,12 @@ int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags)
|
||||
if (!_lock_vol(cmd, resource, flags))
|
||||
return 0;
|
||||
|
||||
/* Perform immediate unlock unless LCK_HOLD set */
|
||||
if (!(flags & LCK_HOLD) && ((flags & LCK_TYPE_MASK) != LCK_UNLOCK)) {
|
||||
/*
|
||||
* If a real lock was acquired (i.e. not LCK_CACHE),
|
||||
* perform an immediate unlock unless LCK_HOLD was requested.
|
||||
*/
|
||||
if (!(flags & LCK_CACHE) && !(flags & LCK_HOLD) &&
|
||||
((flags & LCK_TYPE_MASK) != LCK_UNLOCK)) {
|
||||
if (!_lock_vol(cmd, resource,
|
||||
(flags & ~LCK_TYPE_MASK) | LCK_UNLOCK))
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user