]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: [revert PR#29185] no need to add tail length
authorXiangyang Yu <penglaiyxy@gmail.com>
Fri, 2 Aug 2019 09:37:54 +0000 (17:37 +0800)
committerXiangyang Yu <penglaiyxy@gmail.com>
Fri, 2 Aug 2019 09:48:44 +0000 (17:48 +0800)
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 <penglaiyxy@gmail.com>
src/os/bluestore/BlueStore.cc

index 9233e159cf4589678371011a6f96153ba272749d..36099baf0f0426de26bf4a225ecc633675783449 100644 (file)
@@ -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();