From ac88f05825c257d47f525ab923eb1ce5ef27e5c4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 11 Jan 2018 09:21:54 -0600 Subject: [PATCH] common/options: is_safe() -> can_update_at_runtime() Signed-off-by: Sage Weil --- src/common/config.cc | 2 +- src/common/options.cc | 7 ++++--- src/common/options.h | 14 +++++++++++--- src/mon/ConfigMonitor.cc | 6 +++--- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/common/config.cc b/src/common/config.cc index 3c22efd7a00..bd46466cf91 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -1296,7 +1296,7 @@ int md_config_t::_set_val( } // unsafe runtime change? - if (!opt.is_safe() && + if (!opt.can_update_at_runtime() && safe_to_start_threads && observers.count(opt.name) == 0) { // accept value if it is not actually a change diff --git a/src/common/options.cc b/src/common/options.cc index 7834865dbd1..2e535964814 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -200,7 +200,7 @@ void Option::dump(Formatter *f) const dump_value("min", min, f); dump_value("max", max, f); - f->dump_bool("can_update_at_runtime", is_safe()); + f->dump_bool("can_update_at_runtime", can_update_at_runtime()); } ostream& operator<<(ostream& out, const Option::value_t& v) @@ -255,7 +255,8 @@ void Option::print(ostream *out) const *out << " Minimum: " << stringify(min) << "\n" << " Maximum: " << stringify(max) << "\n"; } - *out << " Can update at runtime: " << (is_safe() ? "true" : "false") << "\n"; + *out << " Can update at runtime: " + << (can_update_at_runtime() ? "true" : "false") << "\n"; if (!services.empty()) { *out << " Services: " << services << "\n"; } @@ -6206,7 +6207,7 @@ static std::vector