]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction_manager: fix get_extents_if_live
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 25 Nov 2024 06:41:54 +0000 (14:41 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 28 Nov 2024 06:19:24 +0000 (14:19 +0800)
It should not assume the paddr type from get_mappings is SEGMENT.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/transaction_manager.cc

index 6e6c8278a3ed1e105de4b213cf9406655de37d81..45fb54f2726c2393f3855fc96ba46a1bfc3d7720 100644 (file)
@@ -757,6 +757,9 @@ TransactionManager::get_extents_if_live(
               LBAMappingRef& pin) -> Cache::get_extent_iertr::future<>
           {
             auto pin_paddr = pin->get_val();
+            if (pin_paddr.get_addr_type() != paddr_types_t::SEGMENT) {
+              return seastar::now();
+            }
             auto &pin_seg_paddr = pin_paddr.as_seg_paddr();
             auto pin_paddr_seg_id = pin_seg_paddr.get_segment_id();
             // auto pin_len = pin->get_length();