]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: make _set_cache_sizes ratio aware of cache_kv_onode_ratio 55220/head
authorRaimund Sacherer <rsachere@redhat.com>
Fri, 26 May 2023 15:15:43 +0000 (17:15 +0200)
committerIgor Fedotov <igor.fedotov@croit.io>
Thu, 18 Jan 2024 01:48:10 +0000 (04:48 +0300)
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 <rsachere@redhat.com>
(cherry picked from commit 8d32e586dcbf355ea7155a4a8c06389be07a2fe8)

src/os/bluestore/BlueStore.cc

index aa14d0204f7aaad4f52b0f855a33def65b2b56eb..d463453cd411985cd5d2c41b43f57b88c5462ac7 100644 (file)
@@ -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;