]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: no 'head_read' when check ondisk length.
authorhaodong <haodong.tang@intel.com>
Thu, 2 Jun 2016 10:32:03 +0000 (18:32 +0800)
committerhaodong <haodong.tang@intel.com>
Thu, 2 Jun 2016 16:05:21 +0000 (00:05 +0800)
Signed-off-by: Haodong Tang <haodong.tang@intel.com>
src/os/bluestore/BlueStore.cc

index 2f1092ee6182a2d8b3a88abe709ec4af9893c963..5e7cff2eddca10f45509cb24fd22bdafb154ec65 100644 (file)
@@ -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) {