From 6f4f28b916dfe9c5964cc231259d0030df576516 Mon Sep 17 00:00:00 2001 From: haodong Date: Thu, 2 Jun 2016 18:32:03 +0800 Subject: [PATCH] os/bluestore: no 'head_read' when check ondisk length. Signed-off-by: Haodong Tang --- src/os/bluestore/BlueStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 2f1092ee6182..5e7cff2eddca 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5564,7 +5564,7 @@ void BlueStore::_do_write_small( uint64_t tail_read = ROUND_UP_TO(b_off + b_len, chunk_size) - (b_off + b_len); if ((head_read || tail_read) && - b->get_ondisk_length() >= b_off + b_len + head_read + tail_read) { + (b->get_ondisk_length() >= b_off + b_len + tail_read)) { dout(20) << __func__ << " reading head 0x" << std::hex << head_read << " and tail 0x" << tail_read << std::dec << dendl; if (head_read) { -- 2.47.3