mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
mds: only client hold xlock in xlockdone can change lock state
If we are in xlockdone, only the client holding that xlock can adjus the lock state (e.g., relock). Other clients have to wait until the xlock cycle unwinds completely. Fixes: #1417 Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
1dfdc730f7
commit
a35ac29bef
@ -1306,7 +1306,8 @@ bool Locker::xlock_start(SimpleLock *lock, MDRequest *mut)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!lock->is_stable() && lock->get_state() != LOCK_XLOCKDONE)
|
||||
if (!lock->is_stable() && !(lock->get_state() == LOCK_XLOCKDONE &&
|
||||
lock->get_xlock_by_client() == client))
|
||||
break;
|
||||
|
||||
if (lock->get_state() == LOCK_LOCK || lock->get_state() == LOCK_XLOCKDONE)
|
||||
|
Loading…
Reference in New Issue
Block a user