]> git-server-git.apps.pok.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)
committerCory Snyder <csnyder@iland.com>
Tue, 8 Jun 2021 18:01:00 +0000 (14:01 -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>
(cherry picked from commit 94fcf109f28636f61275ffa87bb1f958db264d1e)

src/common/config_proxy.h

index 7ca5a54af6a110ab9aa6dc6fa4117896f71d8674..fc8dd1c210d806552d44e65d5bb42aef48fa916a 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);