From: Sage Weil Date: Thu, 17 Mar 2016 21:42:08 +0000 (-0400) Subject: os/bluestore: only cache tail in _pad_tail if we have the whole block X-Git-Tag: v10.1.1~28^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4a9c5d7fd8c5c4a86c40a2802023cc7de5e5b33a;p=ceph.git os/bluestore: only cache tail in _pad_tail if we have the whole block Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 8af1c6a75471..a265d0d4ca89 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5002,7 +5002,8 @@ void BlueStore::_pad_zeros_tail( bl->substr_of(old, 0, *length - back_copy); bl->append(tail); *length += back_pad; - if (end >= o->onode.size && g_conf->bluestore_cache_tails) { + if (tail_len == block_size && + end >= o->onode.size && g_conf->bluestore_cache_tails) { o->tail_bl.clear(); o->tail_bl.append(tail, 0, back_copy); o->tail_offset = end - back_copy;