class Formatter;
}
+namespace ceph::global {
+int g_conf_set_val(const std::string& key, const std::string& s);
+int g_conf_rm_val(const std::string& key);
+}
+
namespace crimson::common {
// a facade for managing config. each shard has its own copy of ConfigProxy.
obs_mgr.remove_observer(obs);
}
seastar::future<> rm_val(const std::string& key) {
+ ceph::global::g_conf_rm_val(key);
return do_change([key, this](ConfigValues& values) {
auto ret = get_config().rm_val(values, key);
if (ret < 0) {
}
seastar::future<> set_val(const std::string& key,
const std::string& val) {
+ ceph::global::g_conf_set_val(key, val);
return do_change([key, val, this](ConfigValues& values) {
std::stringstream err;
auto ret = get_config().set_val(values, obs_mgr, key, val, &err);
#include "crimson/common/config_proxy.h"
#endif
+#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN)
+namespace ceph::global {
+int __attribute__((weak)) g_conf_set_val(const std::string& key, const std::string& s) {
+ return 0;
+}
+
+int __attribute__((weak)) g_conf_rm_val(const std::string& key) {
+ return 0;
+}
+}
+#endif
/*
* Global variables for use from process context.
#endif
}
+#ifdef WITH_ALIEN
+int g_conf_set_val(const std::string& key, const std::string& s)
+{
+ if (g_ceph_context != NULL)
+ return g_ceph_context->_conf.set_val(key, s);
+
+ return 0;
+}
+
+int g_conf_rm_val(const std::string& key)
+{
+ if (g_ceph_context != NULL)
+ return g_ceph_context->_conf.rm_val(key);
+
+ return 0;
+}
+#endif
+
const char *g_assert_file = 0;
int g_assert_line = 0;
const char *g_assert_func = 0;