]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: flush the caps release in filesystem sync 59395/head
authorXiubo Li <xiubli@redhat.com>
Mon, 29 Jul 2024 06:20:41 +0000 (14:20 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 22 Aug 2024 07:30:31 +0000 (15:30 +0800)
We have hit a race between cap releases and cap revoke request
that will cause the check_caps() to miss sending a cap revoke ack
to MDS. And the client will depend on the cap release to release
that revoking caps, which could be delayed for some unknown reasons.

In Kclient we have figured out the RCA about race and we need
a way to explictly trigger this manually could help to get rid
of the caps revoke stuck issue.

Fixes: https://tracker.ceph.com/issues/67221
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit b5bfc4526a2eb242ee580f6908bd9a980a5cf51c)

src/client/Client.cc

index 6d5d2ded8575779c5b2ee8eafdca635fcc922f52..afad5b071b0054c14e29ce0ec5840358341d5154 100644 (file)
@@ -12813,6 +12813,8 @@ int Client::_sync_fs()
   // flush the mdlog before waiting for unsafe requests.
   flush_mdlog_sync();
 
+  flush_cap_releases();
+
   // wait for unsafe mds requests
   wait_unsafe_requests();