]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: only cache tail in _pad_tail if we have the whole block
authorSage Weil <sage@redhat.com>
Thu, 17 Mar 2016 21:42:08 +0000 (17:42 -0400)
committerSage Weil <sage@redhat.com>
Wed, 30 Mar 2016 15:23:14 +0000 (11:23 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 8af1c6a754718b8fe132006d198ab814c3bea582..a265d0d4ca894a0566f175f5b61865b911fdd842 100644 (file)
@@ -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;