]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os: use key_hobj_t instead of full_key_t<> 47729/head
authorKefu Chai <tchaikov@gmail.com>
Mon, 22 Aug 2022 15:20:28 +0000 (23:20 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 22 Aug 2022 15:20:28 +0000 (23:20 +0800)
less indirection this way. for better readability

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/crimson/os/seastore/onode_manager/staged-fltree/tree.h

index 2f379c7d319325c4c6edab21693d61a852c00991..7385e080c8f63a3df012e05e34fd08337a22f30c 100644 (file)
@@ -183,7 +183,7 @@ class Btree {
 
   eagain_ifuture<bool> contains(Transaction& t, const ghobject_t& obj) {
     return seastar::do_with(
-      full_key_t<KeyT::HOBJ>(obj),
+      key_hobj_t{obj},
       [this, &t](auto& key) -> eagain_ifuture<bool> {
         return get_root(t).si_then([this, &t, &key](auto root) {
           // TODO: improve lower_bound()
@@ -197,7 +197,7 @@ class Btree {
 
   eagain_ifuture<Cursor> find(Transaction& t, const ghobject_t& obj) {
     return seastar::do_with(
-      full_key_t<KeyT::HOBJ>(obj),
+      key_hobj_t{obj},
       [this, &t](auto& key) -> eagain_ifuture<Cursor> {
         return get_root(t).si_then([this, &t, &key](auto root) {
           // TODO: improve lower_bound()
@@ -222,7 +222,7 @@ class Btree {
    */
   eagain_ifuture<Cursor> lower_bound(Transaction& t, const ghobject_t& obj) {
     return seastar::do_with(
-      full_key_t<KeyT::HOBJ>(obj),
+      key_hobj_t{obj},
       [this, &t](auto& key) -> eagain_ifuture<Cursor> {
         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<KeyT::HOBJ>(obj),
+      key_hobj_t{obj},
       [this, &t, vconf](auto& key) -> eagain_ifuture<std::pair<Cursor, bool>> {
         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<std::size_t> erase(Transaction& t, const ghobject_t& obj) {
     return seastar::do_with(
-      full_key_t<KeyT::HOBJ>(obj),
+      key_hobj_t{obj},
       [this, &t](auto& key) -> eagain_ifuture<std::size_t> {
         return get_root(t).si_then([this, &t, &key](auto root) {
           return root->erase(get_context(t), key, std::move(root));