]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: force sending cap revoke ack always 52175/head
authorXiubo Li <xiubli@redhat.com>
Wed, 28 Jun 2023 13:59:53 +0000 (21:59 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 28 Jun 2023 13:59:53 +0000 (21:59 +0800)
If just before the revoke request, which will increase the 'seq', is
sent out the clients released the corresponding caps and sent out
the cap update request with old 'seq', the mds will miss checking
the seqs and calculating the caps.

We should always send an ack for revoke requests.

Fixes: https://tracker.ceph.com/issues/61782
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc

index 83885a980e3f5aeab94406b6246ade5a035d387f..4ed12c30a7d734f9383c17fe89416fcfe0d221b0 100644 (file)
@@ -5827,6 +5827,13 @@ void Client::handle_cap_grant(MetaSession *session, Inode *in, Cap *cap, const M
     }
   }
 
+  // just in case the caps was released just before we get the revoke msg
+  if (!check && m->get_op() == CEPH_CAP_OP_REVOKE) {
+    cap->wanted = 0; // don't let check_caps skip sending a response to MDS
+    check = true;
+    flags = CHECK_CAPS_NODELAY;
+  }
+
   if (check)
     check_caps(in, flags);