]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Tue, 10 Mar 2026 02:47:37 +0000 (19:47 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/btree/fixed_kv_btree.h

index 5085eafb702e929f036daa7b1d40574f669e69bf..e8641ff53906da66cad6b2175b7639ed2e4ff54e 100644 (file)
@@ -2398,6 +2398,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,