From 573500783a5c42676bb8cce988c8779b093860cd Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 22 Aug 2022 23:20:28 +0800 Subject: [PATCH] crimson/os: use key_hobj_t instead of full_key_t<> less indirection this way. for better readability Signed-off-by: Kefu Chai --- .../os/seastore/onode_manager/staged-fltree/tree.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crimson/os/seastore/onode_manager/staged-fltree/tree.h b/src/crimson/os/seastore/onode_manager/staged-fltree/tree.h index 2f379c7d31932..7385e080c8f63 100644 --- a/src/crimson/os/seastore/onode_manager/staged-fltree/tree.h +++ b/src/crimson/os/seastore/onode_manager/staged-fltree/tree.h @@ -183,7 +183,7 @@ class Btree { eagain_ifuture contains(Transaction& t, const ghobject_t& obj) { return seastar::do_with( - full_key_t(obj), + key_hobj_t{obj}, [this, &t](auto& key) -> eagain_ifuture { return get_root(t).si_then([this, &t, &key](auto root) { // TODO: improve lower_bound() @@ -197,7 +197,7 @@ class Btree { eagain_ifuture find(Transaction& t, const ghobject_t& obj) { return seastar::do_with( - full_key_t(obj), + key_hobj_t{obj}, [this, &t](auto& key) -> eagain_ifuture { return get_root(t).si_then([this, &t, &key](auto root) { // TODO: improve lower_bound() @@ -222,7 +222,7 @@ class Btree { */ eagain_ifuture lower_bound(Transaction& t, const ghobject_t& obj) { return seastar::do_with( - full_key_t(obj), + key_hobj_t{obj}, [this, &t](auto& key) -> eagain_ifuture { return get_root(t).si_then([this, &t, &key](auto root) { return root->lower_bound(get_context(t), key); @@ -266,7 +266,7 @@ class Btree { } value_config_t vconf{value_builder.get_header_magic(), _vconf.payload_size}; return seastar::do_with( - full_key_t(obj), + key_hobj_t{obj}, [this, &t, vconf](auto& key) -> eagain_ifuture> { ceph_assert(key.is_valid()); return get_root(t).si_then([this, &t, &key, vconf](auto root) { @@ -281,7 +281,7 @@ class Btree { eagain_ifuture erase(Transaction& t, const ghobject_t& obj) { return seastar::do_with( - full_key_t(obj), + key_hobj_t{obj}, [this, &t](auto& key) -> eagain_ifuture { return get_root(t).si_then([this, &t, &key](auto root) { return root->erase(get_context(t), key, std::move(root)); -- 2.39.5