From: Xiubo Li Date: Wed, 28 Jun 2023 13:59:53 +0000 (+0800) Subject: client: force sending cap revoke ack always X-Git-Tag: v16.2.14~32^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F52506%2Fhead;p=ceph.git client: force sending cap revoke ack always 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 (cherry picked from commit 09a2e33c4aca6e72d75e2527ab5f467576d55dc8) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 52980d5ecb07..4d2fcbb232c1 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -5742,6 +5742,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);