From: Sage Weil Date: Fri, 4 Aug 2017 14:27:54 +0000 (-0400) Subject: os/bluestore: fix dirty_shard off-by-one X-Git-Tag: v13.0.0~147^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db79734cd10335ccdc631b87393c07af9b4bf02b;p=ceph.git os/bluestore: fix dirty_shard off-by-one If we dirty an extent that abuts the end of a shard, we should not dirty the next shard too. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e28f6e757fae..d4d95b3ab68f 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -2676,7 +2676,10 @@ void BlueStore::ExtentMap::dirty_range( return; } auto start = seek_shard(offset); - auto last = seek_shard(offset + length); + if (length == 0) { + length = 1; + } + auto last = seek_shard(offset + length - 1); if (start < 0) return;