]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/.../btree_lba_node_impl: mutate_mapping adjust addr for extent...
authorSamuel Just <sjust@redhat.com>
Fri, 21 Aug 2020 21:53:36 +0000 (14:53 -0700)
committerSamuel Just <sjust@redhat.com>
Wed, 23 Sep 2020 22:13:51 +0000 (15:13 -0700)
Addresses must always be adjusted depending on whether the extent will
be written as a block or as a delta.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/lba_manager/btree/lba_btree_node_impl.cc

index 996cca9815b97491c0e249fead53d1e9a0f6d4dc..40ebcedd65d09499587632d6b6bb7cc802c12fed 100644 (file)
@@ -409,7 +409,18 @@ LBALeafNode::mutate_mapping_ret LBALeafNode::mutate_mapping(
     return crimson::ct_error::enoent::make();
   }
 
-  auto mutated = f(mutation_pt.get_val());
+  auto cur = mutation_pt.get_val();
+  auto mutated = f(cur);
+
+  mutated.paddr = maybe_generate_relative(mutated.paddr);
+
+  logger().debug(
+    "{}: mutate addr {}: {} -> {}",
+    __func__,
+    laddr,
+    cur.paddr,
+    mutated.paddr);
+
   if (mutated.refcount > 0) {
     journal_update(mutation_pt, mutated, maybe_get_delta_buffer());
     return mutate_mapping_ret(