os/newstore: fix off-by-one on overlay_max_length

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2015-04-10 11:54:01 -07:00
parent f9a7fd4e4c
commit ec21f578a7

View File

@ -2983,7 +2983,7 @@ int NewStore::_do_write(TransContext *txc,
}
if ((int)o->onode.overlay_map.size() < g_conf->newstore_overlay_max &&
(int)length < g_conf->newstore_overlay_max_length) {
(int)length <= g_conf->newstore_overlay_max_length) {
// write an overlay
r = _do_overlay_write(txc, o, offset, length, bl);
if (r < 0)