]> 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>
Wed, 10 May 2023 10:34:09 +0000 (18:34 +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>
src/client/Client.cc

index a456ea2b81fe64d3c388c510d3da2fb95f73e679..e930edb047cc4ed9a6d1819efdd272b9ff12a4a3 100644 (file)
@@ -11940,6 +11940,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();