From: Jason Dillaman Date: Thu, 29 Oct 2020 13:54:42 +0000 (-0400) Subject: common/config_proxy: expose the 'set_config_values' method X-Git-Tag: v15.2.14~30^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=77aeff97601dc77cb82734e8ffd8dcf2e366cbc8;p=ceph.git common/config_proxy: expose the 'set_config_values' method 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 (cherry picked from commit 94fcf109f28636f61275ffa87bb1f958db264d1e) --- diff --git a/src/common/config_proxy.h b/src/common/config_proxy.h index 7ca5a54af6a..fc8dd1c210d 100644 --- a/src/common/config_proxy.h +++ b/src/common/config_proxy.h @@ -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);