From: Xiubo Li Date: Thu, 4 May 2023 05:57:11 +0000 (+0800) Subject: client: flush the mdlog before waiting for unsafe requests X-Git-Tag: v16.2.14~36^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32b7d2794cceea1e628dcadd627d25072f59a26a;p=ceph.git 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) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 52980d5ecb07..bdb25a48d2bb 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -11691,6 +11691,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();