]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
seastore/cbjournal: add a log if crc is mismatched
authormyoungwon <ohmyoungwon@gmail.com>
Mon, 16 May 2022 04:41:00 +0000 (13:41 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Thu, 19 May 2022 00:52:47 +0000 (09:52 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/crimson/os/seastore/journal/circular_bounded_journal.cc

index cc44df9d46b874d7431862b30a74b990349e02b5..60e35662853528b9f72927a71f31abadc7046b98 100644 (file)
@@ -339,7 +339,12 @@ CircularBoundedJournal::read_header(rbm_abs_addr start)
     ceph_le32 recorded_crc_le;
     decode(recorded_crc_le, bliter);
     uint32_t recorded_crc = recorded_crc_le;
-    ceph_assert(test_crc == recorded_crc);
+    if (test_crc != recorded_crc) {
+      ERROR("read_header: error, header crc mismatch.");
+      return read_header_ret(
+       read_header_ertr::ready_future_marker{},
+       std::nullopt);
+    }
     return read_header_ret(
       read_header_ertr::ready_future_marker{},
       std::make_pair(cbj_header, bl)