os/bluestore: only use tail if tail_offset matches

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-03-17 17:41:56 -04:00
parent 95a5f56093
commit 5a2b36f1e2

View File

@ -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;