]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: skip second wait_for_safe
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Jul 2024 20:28:33 +0000 (16:28 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 25 Sep 2024 19:42:25 +0000 (15:42 -0400)
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 <pdonnell@redhat.com>
src/mds/MDSRank.cc

index 69f99aea1b1447123a30e194356e13529ce006a5..9cf2e89791c058a8c1ff2e1b4bf1f7688bcf5cc5 100644 (file)
@@ -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;