From: Zhang Song Date: Tue, 4 Apr 2023 01:34:06 +0000 (+0800) Subject: crimson/os/seastore: check the type of segment head and segment tail during mount X-Git-Tag: v19.0.0~1391^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F50840%2Fhead;p=ceph.git crimson/os/seastore: check the type of segment head and segment tail during mount Signed-off-by: Zhang Song --- diff --git a/src/crimson/os/seastore/async_cleaner.cc b/src/crimson/os/seastore/async_cleaner.cc index e51e499ef8c7..4bac744e4a06 100644 --- a/src/crimson/os/seastore/async_cleaner.cc +++ b/src/crimson/os/seastore/async_cleaner.cc @@ -1314,6 +1314,7 @@ SegmentCleaner::mount_ret SegmentCleaner::mount() if (tail.segment_nonce != header.segment_nonce) { return scan_no_tail_segment(header, segment_id); } + ceph_assert(header.get_type() == tail.get_type()); sea_time_point modify_time = mod_to_timepoint(tail.modify_time); std::size_t num_extents = tail.num_extents;