From bbefcc2f0bdc11d858752d429220401f58e670ef Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 10 Oct 2017 14:37:59 -0400 Subject: [PATCH] config: Remove _get_val I added this originally to prevent a deadlock when reading a new-style configuration variable from a called observer. I didn't realize at the time that the config mutex was recursive, so this change was superfluous. Signed-off-by: Adam C. Emerson --- src/common/ceph_context.cc | 2 +- src/common/config.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index e82a9b2b122..423a38cb2b1 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -262,7 +262,7 @@ public: } if (changed.find("log_coarse_timestamps") != changed.end()) { - log->set_coarse_timestamps(conf->_get_val("log_coarse_timestamps")); + log->set_coarse_timestamps(conf->get_val("log_coarse_timestamps")); } // metadata diff --git a/src/common/config.h b/src/common/config.h index 2b2509f98a6..ef72699c47a 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -162,7 +162,6 @@ public: int _get_val(const std::string &key, char **buf, int len) const; const Option::value_t& get_val_generic(const std::string &key) const; template const T& get_val(const std::string &key) const; - template const T& _get_val(const std::string &key) const; void get_all_keys(std::vector *keys) const; @@ -324,11 +323,6 @@ const T& md_config_t::get_val(const std::string &key) const { return boost::get(this->get_val_generic(key)); } -template -const T& md_config_t::_get_val(const std::string &key) const { - return boost::get(this->_get_val_generic(key)); -} - inline std::ostream& operator<<(std::ostream& o, const boost::blank& ) { return o << "INVALID_CONFIG_VALUE"; } -- 2.39.5