diff options
author | Sage Weil <sage@inktank.com> | 2013-01-22 14:59:30 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-01-22 15:10:22 -0800 |
commit | c3266ad109616bc9b02841693f94f047b62453c6 (patch) | |
tree | 0d5a84095a5dbb2db5ef0aa315a5327a5ef7ada7 | |
parent | 0ee5ec7eae33125925276c559510a0390a7d4d74 (diff) | |
download | ceph-c3266ad109616bc9b02841693f94f047b62453c6.tar.gz |
config: helper to identify internal fields we should be quiet about
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/common/config.cc | 9 | ||||
-rw-r--r-- | src/common/config.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/common/config.cc b/src/common/config.cc index 7cd9373dd1b..87b74eda668 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -521,6 +521,13 @@ void md_config_t::apply_changes(std::ostream *oss) _apply_changes(oss); } +bool md_config_t::_internal_field(const string& s) +{ + if (s == "internal_safe_to_start_threads") + return true; + return false; +} + void md_config_t::_apply_changes(std::ostream *oss) { /* Maps observers to the configuration options that they care about which @@ -540,7 +547,7 @@ void md_config_t::_apply_changes(std::ostream *oss) const std::string &key(*c); if ((oss) && (!_get_val(key.c_str(), &bufptr, sizeof(buf))) && - key != "internal_safe_to_start_threads") { + !_internal_field(key)) { (*oss) << key << " = '" << buf << "' "; } pair < obs_map_t::iterator, obs_map_t::iterator > diff --git a/src/common/config.h b/src/common/config.h index 86d240f4ce6..9bf04fed8a0 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -111,6 +111,7 @@ public: // Expand all metavariables. Make any pending observer callbacks. void apply_changes(std::ostream *oss); void _apply_changes(std::ostream *oss); + bool _internal_field(const string& k); void call_all_observers(); // Called by the Ceph daemons to make configuration changes at runtime |