]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/lba: merge the whole mapping into the delta
authorXuehan Xu <xuxuehan@qianxin.com>
Thu, 4 Jun 2026 05:59:36 +0000 (13:59 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Fri, 10 Jul 2026 14:24:37 +0000 (22:24 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/cached_extent.cc
src/crimson/os/seastore/lba/lba_btree_node.h

index 3a2a184f80ba70aa6f1217f3fa8be930894c8f53..6f8b4037a37a6b7fdec5bd96e77dc8126d3ba5d7 100644 (file)
@@ -554,7 +554,7 @@ void ExtentCommitter::_share_prior_data_to_mutations() {
           if (it != merged.end()) {
             TRACE("{} -> {}, {} -> {}",
               me, mextent, (pladdr_t)buf.val.pladdr, it->second);
-            buf.val.pladdr = pladdr_le_t(it->second);
+            buf.val = lba::lba_map_val_le_t(it->second);
           }
         }
       });
index 0baa8a288303018dd4a9eb1e9b2f8306fc3dc381..c40b1dee12bb6afb56c9cfe10789991ae5929ad2 100644 (file)
@@ -320,14 +320,14 @@ struct LBALeafNode
 
   std::ostream &print_detail(std::ostream &out) const final;
 
-  std::map<laddr_t, pladdr_t> merge_content_to(
+  std::map<laddr_t, lba_map_val_t> merge_content_to(
     Transaction &t,
     LBALeafNode &pending_version,
     iterator &iter)
   {
     LOG_PREFIX(LBALeafNode::merge_content_to);
     SUBTRACET(seastore_lba, "merging with {}", t, pending_version);
-    std::map<laddr_t, pladdr_t> modified;
+    std::map<laddr_t, lba_map_val_t> modified;
     auto it = pending_version.begin();
     while (it != pending_version.end() && iter != this->end()) {
       const auto &v1 = iter->get_val();
@@ -395,7 +395,7 @@ struct LBALeafNode
             m_v2.checksum = v1.checksum;
           }
           it->set_val(m_v2);
-          auto [_it, inserted] = modified.emplace(it->get_key(), paddr);
+          auto [_it, inserted] = modified.emplace(it->get_key(), m_v2);
           ceph_assert(inserted);
         }
         it++;