From a42a4d405c6543daaee795b48ebed176bc39dd91 Mon Sep 17 00:00:00 2001 From: Zhi Zhang Date: Fri, 2 Feb 2018 16:02:05 +0800 Subject: [PATCH] config: Change bluestore_cache_kv_max to type INT64 If bluestore_cache_kv_max is negative, bluestore won't calculate meta ratio and kv ratio automatically. So change the type from UINT to INT to make this bluestore logic work. Signed-off-by: Zhi Zhang --- src/common/legacy_config_opts.h | 2 +- src/common/options.cc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index cf28ca39b3cec..7775a9b700bf7 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1029,7 +1029,7 @@ OPTION(bluestore_cache_size_hdd, OPT_U64) OPTION(bluestore_cache_size_ssd, OPT_U64) OPTION(bluestore_cache_meta_ratio, OPT_DOUBLE) OPTION(bluestore_cache_kv_ratio, OPT_DOUBLE) -OPTION(bluestore_cache_kv_max, OPT_U64) // limit the maximum amount of cache for the kv store +OPTION(bluestore_cache_kv_max, OPT_INT) // limit the maximum amount of cache for the kv store OPTION(bluestore_kvbackend, OPT_STR) OPTION(bluestore_allocator, OPT_STR) // stupid | bitmap OPTION(bluestore_freelist_blocks_per_key, OPT_INT) diff --git a/src/common/options.cc b/src/common/options.cc index cdb191fcf8107..e826726849a82 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3733,9 +3733,12 @@ std::vector