This is a coarse "there was some config update". It's fired whether or
not it values are observed.
Signed-off-by: Sage Weil <sage@redhat.com>
ldout(cct,10) << __func__ << " " << *m << dendl;
finisher.queue(new FunctionContext([this, m](int r) {
cct->_conf.set_mon_vals(cct, m->config, config_cb);
+ if (config_notify_cb) {
+ config_notify_cb();
+ }
m->put();
}));
got_config = true;
}
void register_config_callback(md_config_t::config_callback fn);
+ void register_config_notify_callback(std::function<void(void)> f) {
+ config_notify_cb = f;
+ }
md_config_t::config_callback get_config_callback();
private:
void handle_get_version_reply(MMonGetVersionReply* m);
md_config_t::config_callback config_cb;
+ std::function<void(void)> config_notify_cb;
};
#endif