]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/NewStore: fix for skipping the overlay in _do_overlay_trim
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Mon, 27 Apr 2015 08:27:21 +0000 (16:27 +0800)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:40 +0000 (13:39 -0400)
When the offset of the write starts at the end of the overlay, that is,
p->first + p->second.length == offset, the overlay could be skipped as
well.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/os/newstore/NewStore.cc

index 21407aa20d7d797a33a044066cacb18ed84fd1d1..b2ffad79bf43b63570d6b44aa769b5c28602e3ec 100644 (file)
@@ -3058,7 +3058,7 @@ int NewStore::_do_overlay_trim(TransContext *txc,
               << dendl;
       break;
     }
-    if (p->first + p->second.length < offset) {
+    if (p->first + p->second.length <= offset) {
       dout(20) << __func__ << " skip " << p->first << " " << p->second
               << dendl;
       ++p;