]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/cache: simplify new extent paddr mapping during complete_transaction
authorSamuel Just <sjust@redhat.com>
Fri, 28 Aug 2020 09:54:54 +0000 (02:54 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 20 Oct 2020 19:27:08 +0000 (12:27 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cache.cc

index 90fc253e40ef69085fcf21ce74f39a460cad670a..6c4cd7dd46fb097afcd7f42e7d1b64752f65da0f 100644 (file)
@@ -278,10 +278,8 @@ void Cache::complete_commit(
     logger().debug("complete_commit: new root {}", *t.root);
   }
 
-  paddr_t cur = final_block_start;
   for (auto &i: t.fresh_block_list) {
-    i->set_paddr(cur);
-    cur.offset += i->get_length();
+    i->set_paddr(final_block_start.add_relative(i->get_paddr()));
     i->last_committed_crc = i->get_crc32c();
     i->on_initial_write();