]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/config_proxy: expose the 'set_config_values' method
authorJason Dillaman <dillaman@redhat.com>
Thu, 29 Oct 2020 13:54:42 +0000 (09:54 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 29 Oct 2020 13:54:42 +0000 (09:54 -0400)
This method was previously only available for seastart builds, but
librbd will also use it to control the timing of updates to the global
config.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/common/config_proxy.h

index 5632fe4efadcf86ac85761160f332ce73e7e236a..fd7c2b98063cb3a4516b4abe6524e71fb38f4cbe 100644 (file)
@@ -124,11 +124,12 @@ public:
   ConfigValues* operator->() noexcept {
     return &values;
   }
-#ifdef WITH_SEASTAR
   void set_config_values(const ConfigValues& val) {
+#ifndef WITH_SEASTAR
+    std::lock_guard l{lock};
+#endif
     values = val;
   }
-#endif
   int get_val(const std::string_view key, char** buf, int len) const {
     std::lock_guard l{lock};
     return config.get_val(values, key, buf, len);