]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fail mds on journal failure
authorMilind Changire <mchangir@redhat.com>
Wed, 20 Jul 2022 14:41:12 +0000 (20:11 +0530)
committerMilind Changire <mchangir@redhat.com>
Wed, 28 Aug 2024 07:03:40 +0000 (12:33 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/mds/MDCache.cc

index f6108ae5ebc4572f8f280ac4a3fe7ccaab5036a2..c8d0749ee814f22c0db7c4571a2ef4fbd9592b25 100644 (file)
@@ -13188,17 +13188,16 @@ class C_MDC_DataUninlinedSubmitted : public MDCacheLogContext {
 
     ceph_assert(in != nullptr);
 
-    if (r) {
-      dout(20) << "(uninline_data) log submission failed; r=" << r
-              << " (" << cpp_strerror(r) << ") for " << *in << dendl;
-      ceph_assert(in->get_scrub_header());
-      in->get_scrub_header()->record_uninline_status(in->ino(), r);
-    } else {
-      dout(20) << "(uninline_data) log submission succeeded for " << *in << dendl;
-      in->mdcache->logger->inc(l_mdc_uninline_succeeded);
-    }
-    in->uninline_finished();
+    dout(20) << "(uninline_data) log submission "
+            << (r ? "failed" : "succeeded")
+            << "; r=" << r
+            << " (" << cpp_strerror(r) << ") for " << *in << dendl;
+
+    // journaling must not fail
+    ceph_assert(r == 0);
 
+    in->mdcache->logger->inc(l_mdc_uninline_succeeded);
+    in->uninline_finished();
     mdr->apply();
     mds->server->respond_to_request(mdr, r);
   }
@@ -13226,7 +13225,6 @@ struct C_IO_DataUninlined : public MDSIOContext {
       ceph_assert(in->get_scrub_header());
       in->get_scrub_header()->record_uninline_status(in->ino(), r);
       in->uninline_finished();
-      mdr->apply();
       mds->server->respond_to_request(mdr, r);
       return;
     }
@@ -13287,7 +13285,6 @@ void MDCache::uninline_data_work(MDRequestRef mdr)
   if (!in->has_inline_data()) {
     dout(20) << "(uninline_data) inode doesn't have inline data anymore " << *in << dendl;
     in->uninline_finished();
-    mdr->apply();
     mds->server->respond_to_request(mdr, 0);
     return;
   }