]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: check against if tail_pad is already 0
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 30 Jun 2016 11:31:45 +0000 (19:31 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 30 Jun 2016 11:31:45 +0000 (19:31 +0800)
So we may skip the potential has_any_lextents() check.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 54cf1e23b2ab0ad0805edb0f011cb8b1cef8446d..f80795e1738cb783fba9120608aa4b233924fc6e 100644 (file)
@@ -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;