mirror of
https://github.com/ceph/ceph
synced 2025-03-07 16:58:39 +00:00
Merge pull request #18034 from tchaikov/wip-options
common/options: pass by reference and use user-literals for size Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
commit
48582cb00e
@ -599,7 +599,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("ms_tcp_prefetch_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("ms_initial_backoff", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
|
||||
@ -1253,7 +1253,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("mon_config_key_max_entry_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("mon_sync_timeout", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
|
||||
@ -1261,7 +1261,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("mon_sync_max_payload_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(1048576)
|
||||
.set_default(1_M)
|
||||
.set_description(""),
|
||||
|
||||
Option("mon_sync_debug", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
|
||||
@ -1687,7 +1687,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_pool_erasure_code_stripe_unit", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_pool_default_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
@ -2309,11 +2309,11 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_command_thread_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(10*60)
|
||||
.set_default(10_min)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_command_thread_suicide_timeout", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(15*60)
|
||||
.set_default(15_min)
|
||||
.set_description(""),
|
||||
|
||||
Option("osd_heartbeat_addr", Option::TYPE_ADDR, Option::LEVEL_ADVANCED)
|
||||
@ -2897,7 +2897,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_long_description("This is an experimental option for rocksdb that works in conjunction with two_level indices to avoid having to keep the entire filter/index in cache when cache_index_and_filter_blocks is true. The idea is to keep a much smaller top-level index in heap/cache and then opportunistically cache the lower level indices. See: https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters"),
|
||||
|
||||
Option("rocksdb_metadata_block_size", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description("The block size for index partitions. (0 = rocksdb default)"),
|
||||
|
||||
Option("mon_rocksdb_options", Option::TYPE_STR, Option::LEVEL_ADVANCED)
|
||||
@ -3029,7 +3029,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("memstore_page_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(64 << 10)
|
||||
.set_default(64_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("objectstore_blackhole", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
|
||||
@ -3068,7 +3068,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("bdev_block_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("bdev_debug_aio", Option::TYPE_BOOL, Option::LEVEL_DEV)
|
||||
@ -3088,15 +3088,15 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_alloc_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(1048576)
|
||||
.set_default(1_M)
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_max_prefetch", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(1048576)
|
||||
.set_default(1_M)
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_min_log_runway", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(1048576)
|
||||
.set_default(1_M)
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_max_log_runway", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
@ -3108,11 +3108,11 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_log_compact_min_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(16*1048576)
|
||||
.set_default(16_M)
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_min_flush_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(524288)
|
||||
.set_default(512_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("bluefs_compact_log_sync", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
|
||||
@ -3564,7 +3564,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description("simulate fragmentation"),
|
||||
|
||||
Option("bluestore_debug_prefragment_max", Option::TYPE_INT, Option::LEVEL_DEV)
|
||||
.set_default(1048576)
|
||||
.set_default(1_M)
|
||||
.set_description(""),
|
||||
|
||||
Option("bluestore_debug_inject_read_err", Option::TYPE_BOOL, Option::LEVEL_DEV)
|
||||
@ -3914,7 +3914,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description("Seconds before backing file system is considered hung"),
|
||||
|
||||
Option("filestore_fiemap_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("filestore_merge_threshold", Option::TYPE_INT, Option::LEVEL_DEV)
|
||||
@ -3986,7 +3986,7 @@ std::vector<Option> get_global_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("journal_block_size", Option::TYPE_INT, Option::LEVEL_DEV)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("journal_max_corrupt_search", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
@ -4111,7 +4111,7 @@ std::vector<Option> get_global_options() {
|
||||
"performance counter data."),
|
||||
|
||||
Option("mgr_client_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
.set_default(128*1048576)
|
||||
.set_default(128_M)
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_client_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
@ -4119,7 +4119,7 @@ std::vector<Option> get_global_options() {
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_osd_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
.set_default(512*1048576)
|
||||
.set_default(512_M)
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_osd_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
@ -4127,7 +4127,7 @@ std::vector<Option> get_global_options() {
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_mds_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
.set_default(128*1048576)
|
||||
.set_default(128_M)
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_mds_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
@ -4135,7 +4135,7 @@ std::vector<Option> get_global_options() {
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_mon_bytes", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
.set_default(128*1048576)
|
||||
.set_default(128_M)
|
||||
.add_service("mgr"),
|
||||
|
||||
Option("mgr_mon_messages", Option::TYPE_UINT, Option::LEVEL_DEV)
|
||||
@ -5958,7 +5958,7 @@ std::vector<Option> get_mds_client_options() {
|
||||
.set_description(""),
|
||||
|
||||
Option("client_max_inline_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
|
||||
.set_default(4096)
|
||||
.set_default(4_K)
|
||||
.set_description(""),
|
||||
|
||||
Option("client_inject_release_failure", Option::TYPE_BOOL, Option::LEVEL_DEV)
|
||||
|
@ -91,7 +91,7 @@ struct Option {
|
||||
std::vector<const char*> see_also;
|
||||
|
||||
value_t min, max;
|
||||
std::vector<std::string> enum_allowed;
|
||||
std::vector<const char*> enum_allowed;
|
||||
|
||||
bool safe;
|
||||
|
||||
@ -191,7 +191,7 @@ struct Option {
|
||||
tags.push_back(tag);
|
||||
return *this;
|
||||
}
|
||||
Option& add_tag(std::initializer_list<const char*> ts) {
|
||||
Option& add_tag(const std::initializer_list<const char*>& ts) {
|
||||
tags.insert(tags.end(), ts);
|
||||
return *this;
|
||||
}
|
||||
@ -199,7 +199,7 @@ struct Option {
|
||||
services.push_back(service);
|
||||
return *this;
|
||||
}
|
||||
Option& add_service(std::initializer_list<const char*> ss) {
|
||||
Option& add_service(const std::initializer_list<const char*>& ss) {
|
||||
services.insert(services.end(), ss);
|
||||
return *this;
|
||||
}
|
||||
@ -207,7 +207,7 @@ struct Option {
|
||||
see_also.push_back(t);
|
||||
return *this;
|
||||
}
|
||||
Option& add_see_also(std::initializer_list<const char*> ts) {
|
||||
Option& add_see_also(const std::initializer_list<const char*>& ts) {
|
||||
see_also.insert(see_also.end(), ts);
|
||||
return *this;
|
||||
}
|
||||
@ -233,9 +233,9 @@ struct Option {
|
||||
return *this;
|
||||
}
|
||||
|
||||
Option& set_enum_allowed(const std::vector<std::string> allowed)
|
||||
Option& set_enum_allowed(const std::initializer_list<const char*>& allowed)
|
||||
{
|
||||
enum_allowed = allowed;
|
||||
enum_allowed.insert(enum_allowed.end(), allowed);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user