]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/seastore: rename Cache::get_root()
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 21 Sep 2020 02:14:36 +0000 (10:14 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Tue, 1 Dec 2020 04:50:53 +0000 (12:50 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/lba_manager/btree/btree_lba_manager.cc
src/crimson/os/seastore/root_block.h

index 703560180785590d2587cb8b432dc9f7914b2af2..2b424a578fd15586582985235fb6b3d37228628d 100644 (file)
@@ -31,7 +31,7 @@ BtreeLBAManager::mkfs_ret BtreeLBAManager::mkfs(
     lba_node_meta_t meta{0, L_ADDR_MAX, 1};
     root_leaf->set_meta(meta);
     root_leaf->pin.set_range(meta);
-    croot->get_lba_root() =
+    croot->get_root() =
       root_t{
         1,
         0,
@@ -47,12 +47,12 @@ BtreeLBAManager::get_root(Transaction &t)
   return cache.get_root(t).safe_then([this, &t](auto croot) {
     logger().debug(
       "BtreeLBAManager::get_root: reading root at {} depth {}",
-      paddr_t{croot->get_lba_root().lba_root_addr},
-      unsigned(croot->get_lba_root().lba_depth));
+      paddr_t{croot->get_root().lba_root_addr},
+      unsigned(croot->get_root().lba_depth));
     return get_lba_btree_extent(
       get_context(t),
-      croot->get_lba_root().lba_depth,
-      croot->get_lba_root().lba_root_addr,
+      croot->get_root().lba_depth,
+      croot->get_root().lba_root_addr,
       paddr_t());
   });
 }
@@ -486,8 +486,8 @@ BtreeLBAManager::insert_mapping_ret BtreeLBAManager::insert_mapping(
          L_ADDR_MIN,
          root->get_paddr(),
          nullptr);
-       croot->get_lba_root().lba_root_addr = nroot->get_paddr();
-       croot->get_lba_root().lba_depth = root->get_node_meta().depth + 1;
+       croot->get_root().lba_root_addr = nroot->get_paddr();
+       croot->get_root().lba_depth = root->get_node_meta().depth + 1;
        return nroot->split_entry(
          get_context(t),
          laddr, nroot->begin(), root);
@@ -540,7 +540,7 @@ BtreeLBAManager::update_internal_mapping(
   paddr_t paddr)
 {
   return cache.get_root(t).safe_then([=, &t](RootBlockRef croot) {
-    if (depth == croot->get_lba_root().lba_depth) {
+    if (depth == croot->get_root().lba_depth) {
       logger().debug(
        "update_internal_mapping: updating lba root to: {}->{}",
        laddr,
@@ -550,8 +550,8 @@ BtreeLBAManager::update_internal_mapping(
        croot = mut_croot->cast<RootBlock>();
       }
       ceph_assert(laddr == 0);
-      auto old_paddr = croot->get_lba_root().lba_root_addr;
-      croot->get_lba_root().lba_root_addr = paddr;
+      auto old_paddr = croot->get_root().lba_root_addr;
+      croot->get_root().lba_root_addr = paddr;
       return update_internal_mapping_ret(
        update_internal_mapping_ertr::ready_future_marker{},
        old_paddr);
@@ -563,8 +563,8 @@ BtreeLBAManager::update_internal_mapping(
        paddr);
       return get_lba_btree_extent(
        get_context(t),
-       croot->get_lba_root().lba_depth,
-       croot->get_lba_root().lba_root_addr,
+       croot->get_root().lba_depth,
+       croot->get_root().lba_root_addr,
        paddr_t()).safe_then([=, &t](LBANodeRef broot) {
          return broot->mutate_internal_address(
            get_context(t),
index a5aac321144f147e98dd6bbc7418e76730fff6d6..25322d769ea6d6e5f471c1c7c29d6076b117191f 100644 (file)
@@ -101,7 +101,7 @@ struct RootBlock : CachedExtent {
     ceph_abort_msg("Root is only written via deltas");
   }
 
-  root_t &get_lba_root() { return root; }
+  root_t &get_root() { return root; }
 };
 using RootBlockRef = RootBlock::Ref;