]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
config: Remove _get_val 18222/head
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 10 Oct 2017 18:37:59 +0000 (14:37 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 10 Oct 2017 18:43:17 +0000 (14:43 -0400)
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 <aemerson@redhat.com>
src/common/ceph_context.cc
src/common/config.h

index e82a9b2b122c2dc1cdaefd2c32c0b398cd7b137f..423a38cb2b1814213ac12fc4140b4c2550359345 100644 (file)
@@ -262,7 +262,7 @@ public:
     }
 
     if (changed.find("log_coarse_timestamps") != changed.end()) {
-      log->set_coarse_timestamps(conf->_get_val<bool>("log_coarse_timestamps"));
+      log->set_coarse_timestamps(conf->get_val<bool>("log_coarse_timestamps"));
     }
 
     // metadata
index 2b2509f98a6f4494b6747de087afceb6f6848c72..ef72699c47afd9cb726f119502f68549370fc852 100644 (file)
@@ -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<typename T> const T& get_val(const std::string &key) const;
-  template<typename T> const T& _get_val(const std::string &key) const;
 
   void get_all_keys(std::vector<std::string> *keys) const;
 
@@ -324,11 +323,6 @@ const T& md_config_t::get_val(const std::string &key) const {
   return boost::get<T>(this->get_val_generic(key));
 }
 
-template<typename T>
-const T& md_config_t::_get_val(const std::string &key) const {
-  return boost::get<T>(this->_get_val_generic(key));
-}
-
 inline std::ostream& operator<<(std::ostream& o, const boost::blank& ) {
       return o << "INVALID_CONFIG_VALUE";
 }