From: Adam C. Emerson Date: Tue, 10 Oct 2017 18:37:59 +0000 (-0400) Subject: config: Remove _get_val X-Git-Tag: v13.0.1~597^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F18222%2Fhead;p=ceph.git 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 --- 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"; }