]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: clean up cache_data_ratio in _set_cache_sizes 15672/head
authorSage Weil <sage@redhat.com>
Tue, 13 Jun 2017 16:11:27 +0000 (12:11 -0400)
committerSage Weil <sage@redhat.com>
Tue, 13 Jun 2017 16:11:27 +0000 (12:11 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 756351da78ec89401f68e2434365d503518ae5b3..988d8c24ec1c167fba48d85d867476aa00929caf 100644 (file)
@@ -3565,6 +3565,10 @@ int BlueStore::_set_cache_sizes()
         << dendl;
     return -EINVAL;
   }
+  if (cache_data_ratio < 0) {
+    // deal with floating point imprecision
+    cache_data_ratio = 0;
+  }
   dout(1) << __func__ << " meta " << cache_meta_ratio
          << " kv " << cache_kv_ratio
          << " data " << cache_data_ratio