From 6779acfe6a06e8a10cb3df1bc014d65d0d24d863 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 4 May 2023 13:57:11 +0800 Subject: [PATCH] client: flush the mdlog before waiting for unsafe requests 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 (cherry picked from commit 2b715b858e36a82b42b12129fcfcc13090f30a93) --- src/client/Client.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index 8613f19ed94..04320c51606 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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(); -- 2.39.5