<< "currently in use. (Is ceph-osd already running?)" << dendl;
return -EBUSY;
}
+
+ g_conf->add_observer(this);
return 0;
}
int OSD::shutdown()
{
+ g_conf->remove_observer(this);
+
service.shutdown();
g_ceph_context->_conf->set_val("debug_osd", "100");
g_ceph_context->_conf->set_val("debug_journal", "100");
// --------------------------------
+const char** OSD::get_tracked_conf_keys() const
+{
+ static const char* KEYS[] = {
+ NULL
+ };
+ return KEYS;
+}
+
+void OSD::handle_conf_change(const struct md_config_t *conf,
+ const std::set <std::string> &changed)
+{
+}
+
+// --------------------------------
+
int OSD::init_op_flags(MOSDOp *op)
{
vector<OSDOp>::iterator iter;
OSDService(OSD *osd);
};
-class OSD : public Dispatcher {
+class OSD : public Dispatcher,
+ public md_config_obs_t {
/** OSD **/
+public:
+ // config observer bits
+ virtual const char** get_tracked_conf_keys() const;
+ virtual void handle_conf_change(const struct md_config_t *conf,
+ const std::set <std::string> &changed);
+
protected:
Mutex osd_lock; // global lock
SafeTimer timer; // safe timer (osd_lock)