]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: check the type of segment head and segment tail during mount 50840/head
authorZhang Song <zhangsong325@gmail.com>
Tue, 4 Apr 2023 01:34:06 +0000 (09:34 +0800)
committerZhang Song <zhangsong325@gmail.com>
Tue, 11 Apr 2023 07:48:52 +0000 (15:48 +0800)
Signed-off-by: Zhang Song <zhangsong325@gmail.com>
src/crimson/os/seastore/async_cleaner.cc

index e51e499ef8c76512244646b1432e53dc31817478..4bac744e4a0672bf27a6279a2a0b34aad4014eed 100644 (file)
@@ -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;