From: Xiangyang Yu Date: Fri, 2 Aug 2019 09:37:54 +0000 (+0800) Subject: os/bluestore: [revert PR#29185] no need to add tail length X-Git-Tag: v15.1.0~1922^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=009987c190f109dc4bd8e1fed6ded606295c7156;p=ceph.git os/bluestore: [revert PR#29185] no need to add tail length Tail length is already caculated in add_buffer forward, so do not need to add tail length in adjust buffer size again. Signed-off-by: Xiangyang Yu --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 9233e159cf45..36099baf0f04 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -1423,7 +1423,7 @@ int BlueStore::BufferSpace::_discard(BufferCacheShard* cache, uint32_t offset, u 0, b); } if (!b->is_writing()) { - cache->_adjust_size(b, tail + front - (int64_t)b->length); + cache->_adjust_size(b, front - (int64_t)b->length); } b->truncate(front); b->maybe_rebuild();