]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Fix dirty_range in BlueStore::_do_remove
authorAdam Kupczyk <akupczyk@ibm.com>
Tue, 15 Apr 2025 08:37:25 +0000 (08:37 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Thu, 4 Dec 2025 19:10:58 +0000 (19:10 +0000)
dirty_range used to have length = 1 byte.
This is good if whole extent is inside shard.
But this has proven not to be the case.
dirty_range(offset, length) is slower only when it crosses shard.

Partially fixes: https://tracker.ceph.com/issues/70390

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit 4f566eaf6c4646e513ea6747c7df17383d8716e2)
(cherry picked from commit d6c61326a125f8bd278ec1c656d673e53edf47cd)
(cherry picked from commit 37248077f4550c85258b98f184193101a02dae0e)

src/os/bluestore/BlueStore.cc

index 68c324593b0438761ea6cb2cffbe43ac3fa7b847..bb88c4864869eb276387c41dd15629ebdbaece21 100644 (file)
@@ -17682,7 +17682,7 @@ int BlueStore::_do_remove(
       bluestore_blob_t& blob = e.blob->dirty_blob();
       blob.clear_flag(bluestore_blob_t::FLAG_SHARED);
       e.blob->get_dirty_shared_blob() = nullptr;
-      h->extent_map.dirty_range(e.logical_offset, 1);
+      h->extent_map.dirty_range(e.logical_offset, e.length);
     }
   }
   txc->write_onode(h);