]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 2 Sep 2025 13:28:03 +0000 (16:28 +0300)
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)

src/os/bluestore/BlueStore.cc

index 1e917708e674c139615691db810f479a599a5110..24a4e3848fc086e2972c1d68ba36e8f806abf5ae 100644 (file)
@@ -18050,7 +18050,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);