From 5a2b36f1e2cccb1d452a20659114ccdbf77b1536 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 17 Mar 2016 17:41:56 -0400 Subject: [PATCH] os/bluestore: only use tail if tail_offset matches Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ca1f93d3520..8af1c6a7547 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5466,6 +5466,7 @@ int BlueStore::_do_write( if (offset >= bp->first && offset > tail_start && offset + length >= o->onode.size && + o->tail_offset == tail_start && o->tail_bl.length() && (offset / block_size == (o->onode.size - 1) / block_size)) { dout(20) << __func__ << " using cached tail" << dendl;