From 442b9c6b5493f11df3bcb95b0465c5a4f61c9bce 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 (cherry picked from commit a42a4d405c6543daaee795b48ebed176bc39dd91) --- 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 de679a89e99d..de32258dfce8 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1070,7 +1070,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 65a1502dc205..619cf25fc606 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -3492,9 +3492,12 @@ std::vector