]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/.../fixed_kv_btree: add get_btree helper
authorSamuel Just <sjust@redhat.com>
Tue, 23 Sep 2025 20:51:18 +0000 (13:51 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 28 Jan 2026 02:36:07 +0000 (18:36 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/btree/fixed_kv_btree.h

index 15849be4cd08d06f2891ace0c98d1432e78f0ef9..852f5bffef231ec66b2c0637a2bdf012004d6cb5 100644 (file)
@@ -2386,6 +2386,15 @@ struct is_fixed_kv_tree<
     cursor_t,
     node_size>> : std::true_type {};
 
+template <typename tree_type_t,
+          std::enable_if_t<is_fixed_kv_tree<tree_type_t>::value, int> = 0>
+Cache::get_root_iertr::future<tree_type_t>
+get_btree(Cache &cache, op_context_t c)
+{
+  auto croot = co_await cache.get_root(c.trans);
+  co_return tree_type_t{croot};
+}
+
 template <
   typename tree_type_t,
   typename F,