From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> We should allow Locker::try_eval(MDSCacheObject *, int) to evaluate locks in replica objects. Otherwise the locks in replica objects may stuck on unstable states forever. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/Locker.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index a03789f..2c840a9 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -834,12 +834,7 @@ void Locker::try_eval(MDSCacheObject *p, int mask) return; } - if (!p->is_auth()) { - dout(7) << "try_eval not auth for " << *p << dendl; - return; - } - - if (!p->can_auth_pin()) { + if (p->is_auth() && !p->can_auth_pin()) { dout(7) << "try_eval can't auth_pin, waiting on " << *p << dendl; p->add_waiter(MDSCacheObject::WAIT_UNFREEZE, new C_Locker_Eval(this, p, mask)); return; @@ -847,9 +842,11 @@ void Locker::try_eval(MDSCacheObject *p, int mask) if (mask & CEPH_LOCK_DN) { assert(mask == CEPH_LOCK_DN); - bool need_issue = false; // ignore this, no caps on dentries - CDentry *dn = (CDentry *)p; - simple_eval(&dn->lock, &need_issue); + if (p->is_auth()) { + bool need_issue = false; // ignore this, no caps on dentries + CDentry *dn = (CDentry *)p; + simple_eval(&dn->lock, &need_issue); + } } else { CInode *in = (CInode *)p; eval(in, mask); -- 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