]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
config: Change bluestore_cache_kv_max to type INT64 20255/head
authorZhi Zhang <willzzhang@tencent.com>
Fri, 2 Feb 2018 08:02:05 +0000 (16:02 +0800)
committerZhi Zhang <willzzhang@tencent.com>
Fri, 2 Feb 2018 08:02:05 +0000 (16:02 +0800)
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 <zhangz.david@outlook.com>
src/common/legacy_config_opts.h
src/common/options.cc

index cf28ca39b3ceca1781ac33ccfb1841d260274e11..7775a9b700bf74ffe3eec1f789d77351835df5ea 100644 (file)
@@ -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)
index cdb191fcf81072f3ac4c322d5e681b02bee7257e..e826726849a82983f7cf540812a61d14de6fb3c2 100644 (file)
@@ -3733,9 +3733,12 @@ std::vector<Option> get_global_options() {
     .set_default(.99)
     .set_description("Ratio of bluestore cache to devote to kv database (rocksdb)"),
 
-    Option("bluestore_cache_kv_max", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
+    Option("bluestore_cache_kv_max", Option::TYPE_INT, Option::LEVEL_ADVANCED)
     .set_default(512_M)
-    .set_description("Max memory (bytes) to devote to kv database (rocksdb)"),
+    .set_description("Max memory (bytes) to devote to kv database (rocksdb)")
+    .set_long_description("A negative value means using bluestore_cache_meta_ratio "
+      "and bluestore_cache_kv_ratio instead of calculating these ratios using "
+      "bluestore_cache_size_* and bluestore_cache_kv_max."),
 
     Option("bluestore_kvbackend", Option::TYPE_STR, Option::LEVEL_DEV)
     .set_default("rocksdb")