]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/epm: add checks in ool writes about the writer type
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 15 Jul 2024 06:42:13 +0000 (14:42 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 29 Jul 2024 08:48:03 +0000 (16:48 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/extent_placement_manager.cc

index c0d2faa2503ee8b364aea308e487f1f185ab9110..1603b9179b720fbecccf4ca4a91142c37d299746 100644 (file)
@@ -498,6 +498,7 @@ ExtentPlacementManager::write_delayed_ool_extents(
       assert(extent->is_valid());
     });
 #endif
+    assert(writer->get_type() == backend_type_t::SEGMENTED);
     return writer->alloc_write_ool_extents(t, extents);
   });
 }
@@ -524,6 +525,7 @@ ExtentPlacementManager::write_preallocated_ool_extents(
     return trans_intr::do_for_each(alloc_map, [&t](auto& p) {
       auto writer = p.first;
       auto& extents = p.second;
+      assert(writer->get_type() == backend_type_t::RANDOM_BLOCK);
       return writer->alloc_write_ool_extents(t, extents);
     });
   });