]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove calculating caps after adding revokes back 52851/head
authorXiubo Li <xiubli@redhat.com>
Fri, 23 Jun 2023 14:44:23 +0000 (22:44 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 23 Aug 2023 09:28:30 +0000 (17:28 +0800)
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 <xiubli@redhat.com>
(cherry picked from commit b6e2681ebd87ccbc964d0cb4758a26748d517fcf)

src/mds/Capability.cc

index 471ee79bfeeb8b8c0bb7b565379a8af3d47e0d66..de2a16e1ab19870bdcb7dc9d4a94dcfae6cb4168 100644 (file)
@@ -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?