From d9f84b41eff99357585f27c89449e379a28a9212 Mon Sep 17 00:00:00 2001 From: Deepika Upadhyay Date: Thu, 21 May 2020 02:02:02 +0530 Subject: [PATCH] bluestore: _get_used_bytes should reflect new mempool fields with bluestore_cache_other split further, the _get_used_bytes should take into account the new mempool splits as well. see also: 0ce8ee4b123eacfc2bfb14f554487e928512415a 68ee931fd4b6bf748f95b14dae31d11738fbaf1e Signed-off-by: Deepika Upadhyay --- src/os/bluestore/BlueStore.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 37d0979092b7c..a6fbd789442c0 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -2211,9 +2211,13 @@ private: MetaCache(BlueStore *s) : MempoolCache(s) {}; virtual uint64_t _get_used_bytes() const { - return mempool::bluestore_cache_meta::allocated_bytes() + - mempool::bluestore_cache_other::allocated_bytes() + - mempool::bluestore_cache_onode::allocated_bytes(); + return mempool::bluestore_Buffer::allocated_bytes() + + mempool::bluestore_Blob::allocated_bytes() + + mempool::bluestore_Extent::allocated_bytes() + + mempool::bluestore_cache_meta::allocated_bytes() + + mempool::bluestore_cache_other::allocated_bytes() + + mempool::bluestore_SharedBlob::allocated_bytes() + + mempool::bluestore_inline_bl::allocated_bytes(); } virtual std::string get_cache_name() const { -- 2.39.5