From: Zhiqiang Wang Date: Mon, 27 Apr 2015 08:27:21 +0000 (+0800) Subject: osd/NewStore: fix for skipping the overlay in _do_overlay_trim X-Git-Tag: v9.1.0~242^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c552cd20ab84997e9fc2d6795b69d70116e82708;p=ceph.git osd/NewStore: fix for skipping the overlay in _do_overlay_trim 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 --- diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index 21407aa20d7d..b2ffad79bf43 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -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;