From: Milind Changire Date: Wed, 20 Jul 2022 14:41:12 +0000 (+0530) Subject: mds: fail mds on journal failure X-Git-Tag: v20.0.0~1119^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=23b0484bf525f75982c221d3dd9823264d87677b;p=ceph.git mds: fail mds on journal failure Signed-off-by: Milind Changire --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index f6108ae5ebc..c8d0749ee81 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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; }