Skip to content

Commit 8d32e58

Browse files
author
Raimund Sacherer
committed
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 <[email protected]>
1 parent c50902c commit 8d32e58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4955,10 +4955,11 @@ int BlueStore::_set_cache_sizes()
49554955
return -EINVAL;
49564956
}
49574957

4958-
if (cache_meta_ratio + cache_kv_ratio > 1.0) {
4958+
if (cache_meta_ratio + cache_kv_ratio + cache_kv_onode_ratio > 1.0) {
49594959
derr << __func__ << " bluestore_cache_meta_ratio (" << cache_meta_ratio
49604960
<< ") + bluestore_cache_kv_ratio (" << cache_kv_ratio
4961-
<< ") = " << cache_meta_ratio + cache_kv_ratio << "; must be <= 1.0"
4961+
<< ") + bluestore_cache_kv_onode_ratio (" << cache_kv_onode_ratio
4962+
<< ") = " << cache_meta_ratio + cache_kv_ratio + cache_kv_onode_ratio << "; must be <= 1.0"
49624963
<< dendl;
49634964
return -EINVAL;
49644965
}
@@ -4975,6 +4976,7 @@ int BlueStore::_set_cache_sizes()
49754976
dout(1) << __func__ << " cache_size " << cache_size
49764977
<< " meta " << cache_meta_ratio
49774978
<< " kv " << cache_kv_ratio
4979+
<< " kv_onode " << cache_kv_onode_ratio
49784980
<< " data " << cache_data_ratio
49794981
<< dendl;
49804982
return 0;

0 commit comments

Comments
 (0)