From 5db159e24b5d5d764ea4d3d4b5109ab8f95e10af Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Thu, 16 Feb 2023 12:46:33 +0000 Subject: [PATCH] os/bluestore: add ExtentMap::maybe_reshard maybe_reshard is created to filter out unnecessary calls to request_reshard. The intended use is to let just request maybe_reshard, and delegate check if the action is really necessary to the implementation detail level. Signed-off-by: Adam Kupczyk --- src/os/bluestore/BlueStore.cc | 4 +--- src/os/bluestore/BlueStore.h | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 42d8338ffae..1a811050c7d 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3615,9 +3615,7 @@ BlueStore::Extent *BlueStore::ExtentMap::set_lextent( Extent *le = new Extent(logical_offset, blob_offset, length, b); extent_map.insert(*le); - if (spans_shard(logical_offset, length)) { - request_reshard(logical_offset, logical_offset + length); - } + maybe_reshard(logical_offset, logical_offset + length); return le; } diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 4ee5f174e97..ef8e380dbb3 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -898,6 +898,14 @@ public: needs_reshard_end = end; } } + // signals that there was a modification on range