From: Raimund Sacherer Date: Fri, 26 May 2023 15:15:43 +0000 (+0200) Subject: osd: make _set_cache_sizes ratio aware of cache_kv_onode_ratio X-Git-Tag: v18.2.5~446^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c154718c8aeefb109e6db6dc9633a4748064648b;p=ceph.git osd: make _set_cache_sizes ratio aware of cache_kv_onode_ratio The formula checking if all the cache sizes sum up to <= 1 did not take cache_kv_onode_ratio into account. The last dout line did also not take cache_kv_onode_ratio into account. Signed-off-by: Raimund Sacherer (cherry picked from commit 8d32e586dcbf355ea7155a4a8c06389be07a2fe8) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index aa14d0204f7a..d463453cd411 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -4955,10 +4955,11 @@ int BlueStore::_set_cache_sizes() return -EINVAL; } - if (cache_meta_ratio + cache_kv_ratio > 1.0) { + if (cache_meta_ratio + cache_kv_ratio + cache_kv_onode_ratio > 1.0) { derr << __func__ << " bluestore_cache_meta_ratio (" << cache_meta_ratio << ") + bluestore_cache_kv_ratio (" << cache_kv_ratio - << ") = " << cache_meta_ratio + cache_kv_ratio << "; must be <= 1.0" + << ") + bluestore_cache_kv_onode_ratio (" << cache_kv_onode_ratio + << ") = " << cache_meta_ratio + cache_kv_ratio + cache_kv_onode_ratio << "; must be <= 1.0" << dendl; return -EINVAL; } @@ -4975,6 +4976,7 @@ int BlueStore::_set_cache_sizes() dout(1) << __func__ << " cache_size " << cache_size << " meta " << cache_meta_ratio << " kv " << cache_kv_ratio + << " kv_onode " << cache_kv_onode_ratio << " data " << cache_data_ratio << dendl; return 0;