]> 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 51784/head
authorRaimund Sacherer <rsachere@redhat.com>
Fri, 26 May 2023 15:15:43 +0000 (17:15 +0200)
committerRaimund Sacherer <rsachere@redhat.com>
Tue, 24 Oct 2023 08:27:56 +0000 (10:27 +0200)
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>
src/os/bluestore/BlueStore.cc

index a489cb65d2e10064a1eae94335b2a39942233738..66faedaddf67b311f7aebe1bc5dac548a1e0d182 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;