From: Yan, Zheng Date: Tue, 12 Nov 2019 03:28:57 +0000 (+0800) Subject: mds: properly evaluate unstable locks when evicting client X-Git-Tag: v15.1.0~823^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06f175f34dbec471e5c31b00f76ccce727f3ff3b;p=ceph.git mds: properly evaluate unstable locks when evicting client make sure we call Locker::eval_gather() for inodes in 'to_eval' list. Signed-off-by: "Yan, Zheng" Fixes: https://tracker.ceph.com/issues/42759 --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 27d8a16eb57..d34748f05b9 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -2143,6 +2143,7 @@ bool Locker::revoke_stale_caps(Session *session) // invalidate all caps session->inc_cap_gen(); + bool ret = true; std::vector to_eval; for (auto p = session->caps.begin(); !p.end(); ) { @@ -2159,8 +2160,10 @@ bool Locker::revoke_stale_caps(Session *session) if (!revoking) continue; - if (revoking & CEPH_CAP_ANY_WR) - return false; + if (revoking & CEPH_CAP_ANY_WR) { + ret = false; + break; + } int issued = cap->issued(); CInode *in = cap->get_inode(); @@ -2195,7 +2198,7 @@ bool Locker::revoke_stale_caps(Session *session) request_inode_file_caps(in); } - return true; + return ret; } void Locker::resume_stale_caps(Session *session)