From: "Yan, Zheng" <zheng.z....@intel.com> Once a lock is in LOCK_XLOCKDONE state, client already holds xlock can acquire extra xlock. So wake up xlock waiter when we set lock state to LOCK_XLOCKDONE.
Signed-off-by: Yan, Zheng <zheng.z....@intel.com> --- src/mds/Locker.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 47ea6fc..a4b50db 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -477,6 +477,7 @@ void Locker::set_xlocks_done(Mutation *mut, bool skip_dentry) continue; dout(10) << "set_xlocks_done on " << **p << " " << *(*p)->get_parent() << dendl; (*p)->set_xlock_done(); + (*p)->finish_waiters(ScatterLock::WAIT_XLOCK); } } @@ -1419,7 +1420,7 @@ bool Locker::xlock_start(SimpleLock *lock, MDRequest *mut) } } - lock->add_waiter(SimpleLock::WAIT_WR|SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mut)); + lock->add_waiter(SimpleLock::WAIT_XLOCK|SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mut)); nudge_log(lock); return false; } else { -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html