From: Xiubo Li Date: Fri, 23 Jun 2023 14:44:23 +0000 (+0800) Subject: mds: remove calculating caps after adding revokes back X-Git-Tag: v18.2.1~139^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c50d98cd49fd2df8a5430441b2b23dd7dd0b5069;p=ceph-ci.git mds: remove calculating caps after adding revokes back The calc_issued() makes no sense and will blindly set the 'issued' to the 'pending', which is incorrect. For the cap update msg it will pass the client's 'implemented' caps to MDS, and MDS will use the 'implemented' to calculate the 'issued' and 'pending' members and also will adjust the revoke list. The confirm_receipt() has already correctly calculating the 'issued' and 'pending' members. And after add the cap back to the revoke list we should mark it notable, which will move the cap object to the front of session list. Fixes: https://tracker.ceph.com/issues/61781 Signed-off-by: Xiubo Li (cherry picked from commit b6e2681ebd87ccbc964d0cb4758a26748d517fcf) --- diff --git a/src/mds/Capability.cc b/src/mds/Capability.cc index 471ee79bfee..de2a16e1ab1 100644 --- a/src/mds/Capability.cc +++ b/src/mds/Capability.cc @@ -196,7 +196,8 @@ int Capability::confirm_receipt(ceph_seq_t seq, unsigned caps) { dout(10) << "revocation is not totally finished yet on " << *in << ", the session " << *session << dendl; _revokes.emplace_back(_pending, last_sent, last_issue); - calc_issued(); + if (!is_notable()) + mark_notable(); } } else { // can i forget any revocations?