From: Yingxin Cheng Date: Wed, 23 Oct 2024 07:21:41 +0000 (+0800) Subject: crimson/os/seastore/cache: cleanup, use the same method to create extents X-Git-Tag: testing/wip-vshankar-testing-20241129.105255-debug~9^2~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df15d59dfb349413d864b38f62d1c7f41cad6525;p=ceph-ci.git crimson/os/seastore/cache: cleanup, use the same method to create extents Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/cache.cc b/src/crimson/os/seastore/cache.cc index 70fec7caca4..0a1c2b576bb 100644 --- a/src/crimson/os/seastore/cache.cc +++ b/src/crimson/os/seastore/cache.cc @@ -1826,7 +1826,7 @@ void Cache::init() remove_extent(root, nullptr); root = nullptr; } - root = new RootBlock(); + root = CachedExtent::make_cached_extent_ref(); root->init(CachedExtent::extent_state_t::CLEAN, P_ADDR_ROOT, PLACEMENT_HINT_NULL, diff --git a/src/crimson/os/seastore/cache.h b/src/crimson/os/seastore/cache.h index cd65d82fe5a..e93e0f91a9b 100644 --- a/src/crimson/os/seastore/cache.h +++ b/src/crimson/os/seastore/cache.h @@ -1068,7 +1068,7 @@ public: // (relative/temp) paddr, so make extent directly ext = CachedExtent::make_cached_extent_ref(std::move(nbp)); } else { - ext = CachedExtent::make_placeholder_cached_extent_ref(remap_length); + ext = CachedExtent::make_cached_extent_ref(remap_length); } ext->init(CachedExtent::extent_state_t::EXIST_CLEAN, diff --git a/src/crimson/os/seastore/cached_extent.h b/src/crimson/os/seastore/cached_extent.h index 8443c99b90a..99bad9094bf 100644 --- a/src/crimson/os/seastore/cached_extent.h +++ b/src/crimson/os/seastore/cached_extent.h @@ -816,9 +816,8 @@ protected: } template - static TCachedExtentRef make_placeholder_cached_extent_ref( - extent_len_t length) { - return new T(length); + static TCachedExtentRef make_cached_extent_ref() { + return new T(); } void reset_prior_instance() {