From: xie xingguo Date: Thu, 30 Jun 2016 11:31:45 +0000 (+0800) Subject: os/bluestore: check against if tail_pad is already 0 X-Git-Tag: ses5-milestone5~554^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9999%2Fhead;p=ceph.git os/bluestore: check against if tail_pad is already 0 So we may skip the potential has_any_lextents() check. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 54cf1e23b2ab..f80795e1738c 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5639,7 +5639,7 @@ void BlueStore::_do_write_small( } uint64_t tail_pad = ROUND_UP_TO(offset + length, chunk_size) - (offset + length); - if (o->onode.has_any_lextents(offset + length, tail_pad)) { + if (tail_pad && o->onode.has_any_lextents(offset + length, tail_pad)) { tail_pad = 0; } bufferlist padded = bl;