]> 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>
Mon, 5 Jan 2026 20:44:37 +0000 (12:44 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/btree/fixed_kv_btree.h

index cb3624ba2daf92a3165bd41b0a66c8751c1b1450..7af3bb260a39f45df2e6a1c28ba77a02ce6d6984 100644 (file)
@@ -2378,6 +2378,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,