]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: flush the mdlog before waiting for unsafe requests
authorXiubo Li <xiubli@redhat.com>
Thu, 4 May 2023 05:57:11 +0000 (13:57 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 4 Jul 2023 01:38:11 +0000 (09:38 +0800)
For safe replies the clients need to wait the MDS daemons to flush
the journal logs to Rados first. The worst case it will take 5 seconds.

Just trigger to flush the journal logs before waiting.

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

src/client/Client.cc

index 8613f19ed94a2ec27eca87b72e3b3e62960c9e93..04320c51606d20f947e4049c22309cb35f5c4f02 100644 (file)
@@ -11780,6 +11780,9 @@ int Client::_sync_fs()
   flush_caps_sync();
   ceph_tid_t flush_tid = last_flush_tid;
 
+  // flush the mdlog before waiting for unsafe requests.
+  flush_mdlog_sync();
+
   // wait for unsafe mds requests
   wait_unsafe_requests();