]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add tail length when caculating reserved buffer size 29185/head
authorXiangyang Yu <penglaiyxy@gmail.com>
Wed, 24 Jul 2019 00:34:49 +0000 (08:34 +0800)
committerXiangyang Yu <penglaiyxy@gmail.com>
Mon, 29 Jul 2019 02:44:16 +0000 (10:44 +0800)
Signed-off-by: Xiangyang Yu <penglaiyxy@gmail.com>
src/os/bluestore/BlueStore.cc

index 36099baf0f0426de26bf4a225ecc633675783449..9233e159cf4589678371011a6f96153ba272749d 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, front - (int64_t)b->length);
+         cache->_adjust_size(b, tail + front - (int64_t)b->length);
        }
        b->truncate(front);
        b->maybe_rebuild();