From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> Locker::simple_excl() and Locker::scatter_mix() miss is_rdlocked check; Locker::file_excl() miss is_rdlocked check and is_wrlocked check. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/Locker.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index dec0a94..e826321 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -3408,6 +3408,8 @@ void Locker::simple_excl(SimpleLock *lock, bool *need_issue) } int gather = 0; + if (lock->is_rdlocked()) + gather++; if (lock->is_wrlocked()) gather++; if (lock->is_xlocked()) @@ -4167,6 +4169,8 @@ void Locker::scatter_mix(ScatterLock *lock, bool *need_issue) } int gather = 0; + if (lock->is_rdlocked()) + gather++; if (in->is_replicated()) { if (lock->get_state() != LOCK_EXCL_MIX && // EXCL replica is already LOCK lock->get_state() != LOCK_XSYN_EXCL) { // XSYN replica is already LOCK; ** FIXME here too! @@ -4237,6 +4241,11 @@ void Locker::file_excl(ScatterLock *lock, bool *need_issue) } int gather = 0; + if (lock->is_rdlocked()) + gather++; + if (lock->is_wrlocked()) + gather++; + if (in->is_replicated() && lock->get_state() != LOCK_LOCK_EXCL && lock->get_state() != LOCK_XSYN_EXCL) { // if we were lock, replicas are already lock. -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html