]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/lba_manager: rename clone_extent to clone_mapping
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 31 Oct 2023 12:42:56 +0000 (20:42 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Thu, 2 Nov 2023 06:23:10 +0000 (14:23 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/lba_manager.h
src/crimson/os/seastore/lba_manager/btree/btree_lba_manager.h
src/crimson/os/seastore/transaction_manager.h

index d7adf2304fbb69ba27eff162d6f837597d1e7ac6..d4d1826bcf9069a75f19a9b914b7c38679bab561 100644 (file)
@@ -89,7 +89,7 @@ public:
     paddr_t addr,
     LogicalCachedExtent &nextent) = 0;
 
-  virtual alloc_extent_ret clone_extent(
+  virtual alloc_extent_ret clone_mapping(
     Transaction &t,
     laddr_t hint,
     extent_len_t len,
index 7895f806abd54504ee0db1347c1205e5b625c3a6..79d21b363af33f69a154b06c1b478de865ec16cc 100644 (file)
@@ -220,7 +220,7 @@ public:
       nullptr);
   }
 
-  alloc_extent_ret clone_extent(
+  alloc_extent_ret clone_mapping(
     Transaction &t,
     laddr_t hint,
     extent_len_t len,
index f30dea3bd7797ae090f42d62cf37c27d11fcf860..b708e0a9f203043c8a372bcff75a905dc618139a 100644 (file)
@@ -485,12 +485,12 @@ public:
   }
 
   /*
-   * clone_pin
+   * clone_mapping
    *
    * create an indirect lba mapping pointing to the physical
    * lba mapping whose key is intermediate_key. Resort to btree_lba_manager.h
-   * for the definition of "indirect lba mapping" and "physical lba mapping"
-   *
+   * for the definition of "indirect lba mapping" and "physical lba mapping".
+   * Note that the cloned extent must be stable
    */
   using clone_extent_iertr = alloc_extent_iertr;
   using clone_extent_ret = clone_extent_iertr::future<LBAMappingRef>;
@@ -507,7 +507,7 @@ public:
     SUBDEBUGT(seastore_tm, "len={}, laddr_hint={}, clone_offset {}",
       t, mapping.get_length(), hint, intermediate_key);
     ceph_assert(is_aligned(hint, epm->get_block_size()));
-    return lba_manager->clone_extent(
+    return lba_manager->clone_mapping(
       t,
       hint,
       mapping.get_length(),
@@ -887,7 +887,7 @@ private:
       fut = lba_manager->alloc_extent(
        t, remap_laddr, remap_length, remap_paddr, *ext);
     } else {
-      fut = lba_manager->clone_extent(
+      fut = lba_manager->clone_mapping(
        t,
        remap_laddr,
        remap_length,