From 56429b0b8dcb7aecb7b198d9211cc54d53a83f7f Mon Sep 17 00:00:00 2001 From: myoungwon Date: Mon, 16 May 2022 13:41:00 +0900 Subject: [PATCH] seastore/cbjournal: add a log if crc is mismatched Signed-off-by: Myoungwon Oh --- .../os/seastore/journal/circular_bounded_journal.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/crimson/os/seastore/journal/circular_bounded_journal.cc b/src/crimson/os/seastore/journal/circular_bounded_journal.cc index cc44df9d46b87..60e3566285352 100644 --- a/src/crimson/os/seastore/journal/circular_bounded_journal.cc +++ b/src/crimson/os/seastore/journal/circular_bounded_journal.cc @@ -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) -- 2.39.5