From ddc55945ea23ead705cd0855c2360ef5e52428a2 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 30 Jul 2024 16:28:33 -0400 Subject: [PATCH] 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 --- src/mds/MDSRank.cc | 27 --------------------------- 1 file changed, 27 deletions(-) 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; -- 2.47.3