This issues the race between recovery can start but not all osc are added yet.
Fix adds obd_configured flag to track when config llog parsing is finished and MDS is really set up and ready for recovery.
obd_starting:1, /* started setup */
obd_force:1, /* cleanup with > 0 obd refcount */
obd_fail:1, /* cleanup with failover */
- obd_async_recov:1; /* allow asyncronous orphan cleanup */
+ obd_async_recov:1, /* allow asyncronous orphan cleanup */
+ obd_configured:1; /* config llog parsed completely */
atomic_t obd_refcount;
cfs_waitq_t obd_refcount_waitq;
cfs_proc_dir_entry_t *obd_proc_entry;
if (target->obd_recovering) {
lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_RECOVERING);
- target_start_recovery_timer(target/*, handler*/);
+ target_start_recovery_timer(target);
}
/* Tell the client if we support replayable requests */
if (obd->obd_abort_recovery)
return 1;
LASSERT(obd->obd_connected_clients <= obd->obd_max_recoverable_clients);
- if (obd->obd_connected_clients == obd->obd_max_recoverable_clients)
+ if (obd->obd_configured &&
+ obd->obd_connected_clients == obd->obd_max_recoverable_clients)
return 1;
return 0;
}
CDEBUG(D_CONFIG, "updated max_mdsize/max_cookiesize: %d/%d\n",
mds->mds_max_mdsize, mds->mds_max_cookiesize);
+ /*XXX this notifies the MDD until lov handling use old mds code */
+ if (obd->obd_upcall.onu_owner) {
+ LASSERT(obd->obd_upcall.onu_upcall != NULL);
+ rc = obd->obd_upcall.onu_upcall(NULL, NULL, 0,
+ obd->obd_upcall.onu_owner);
+ }
out:
OBD_FREE(ld, sizeof(*ld));
RETURN(rc);
RETURN(rc);
}
+void class_config_notify_end(const char *name)
+{
+ ENTRY;
+ struct obd_device *obd;
+
+ /*XXX: This is fast fix to mountconf issue when osc are set up
+ * while recovery is in progress already.
+ * The MDS should wait the end of config llog parsing before starting
+ * recovery. This is done via obd_configured flag for now
+ */
+ obd = class_name2obd(name);
+ if (obd) {
+ obd->obd_configured = 1;
+ }
+ EXIT;
+}
+
int class_config_parse_llog(struct llog_ctxt *ctxt, char *name,
struct config_llog_instance *cfg)
{
rc = llog_process(llh, class_config_llog_handler, cfg, &cd);
+ class_config_notify_end(name);
+
CDEBUG(D_CONFIG, "Processed log %s gen %d-%d (rc=%d)\n", name,
cd.first_idx + 1, cd.last_idx, rc);
if (cfg)