From: Patrick Donnelly Date: Tue, 30 Jul 2024 20:28:33 +0000 (-0400) Subject: mds: skip second wait_for_safe X-Git-Tag: v20.0.0~955^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ddc55945ea23ead705cd0855c2360ef5e52428a2;p=ceph.git mds: skip second wait_for_safe Now that we only trim up to the segment created for the flush, this second wait should no longer be necessary. Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 69f99aea1b1..9cf2e89791c 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -111,33 +111,6 @@ private: mdlog->wait_for_safe(new MDSInternalContextWrapper(mds, ctx)); } - void handle_flush_mdlog(int r) { - dout(20) << __func__ << ": r=" << r << dendl; - - if (r != 0) { - *ss << "Error " << r << " (" << cpp_strerror(r) << ") while flushing journal"; - complete(r); - return; - } - - clear_mdlog(); - } - - void clear_mdlog() { - dout(20) << __func__ << dendl; - - Context *ctx = new LambdaContext([this](int r) { - handle_clear_mdlog(r); - }); - - // Because we may not be the last wait_for_safe context on MDLog, - // and subsequent contexts might wake up in the middle of our - // later trim_all and interfere with expiry (by e.g. marking - // dirs/dentries dirty on previous log segments), we run a second - // wait_for_safe here. See #10368 - mdlog->wait_for_safe(new MDSInternalContextWrapper(mds, ctx)); - } - void handle_clear_mdlog(int r) { dout(20) << __func__ << ": r=" << r << dendl;