From: Kefu Chai Date: Mon, 22 Aug 2022 15:20:28 +0000 (+0800) Subject: crimson/os: use key_hobj_t instead of full_key_t<> X-Git-Tag: v18.0.0~184^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=573500783a5c42676bb8cce988c8779b093860cd;p=ceph-ci.git crimson/os: use key_hobj_t instead of full_key_t<> less indirection this way. for better readability Signed-off-by: Kefu Chai --- 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 2f379c7d319..7385e080c8f 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));