struct lustre_mount_info *lmi;
int rc = 0;
ENTRY;
- LASSERT(mnt);
/* It is impossible to have more than 1 MGS per node, since
MGC wouldn't know which to connect to */
if (!rc) {
rc = lustre_start_simple(LUSTRE_MGS_OBDNAME, LUSTRE_MGS_NAME,
- LUSTRE_MGS_OBDNAME, 0, 0, 0, 0);
+ LUSTRE_MGS_OBDNAME, 0, 0,
+ lsi->lsi_osd_obdname, 0);
/* Do NOT call server_deregister_mount() here. This leads to
* inability cleanup cleanly and free lsi and other stuff when
* mgs calls server_put_mount() in error handling case. -umka */
/* New failover node */
sprintf(niduuid, "%s_%x", mgcname, i);
j = 0;
- while (class_parse_nid(ptr, &nid, &ptr) == 0) {
+ while (class_parse_nid_quiet(ptr, &nid, &ptr) == 0) {
j++;
rc = do_lcfg(mgcname, nid,
LCFG_ADD_UUID, niduuid, 0,0,0);
struct obd_device *obd;
struct lustre_sb_info *lsi = s2lsi(sb);
struct config_llog_instance cfg;
+ struct lu_env env;
+ struct lu_device *dev;
int rc;
ENTRY;
RETURN(-ENXIO);
}
- if ((lsi->lsi_lmd->lmd_flags & LMD_FLG_ABORT_RECOV) &&
- (OBP(obd, iocontrol))) {
- obd_iocontrol(OBD_IOC_ABORT_RECOVERY,
- obd->obd_self_export, 0, NULL, NULL);
- }
-
server_notify_target(sb, obd);
/* calculate recovery timeout, do it after lustre_process_log */
/* log has been fully processed */
obd_notify(obd, NULL, OBD_NOTIFY_CONFIG, (void *)CONFIG_LOG);
+
+ /* log has been fully processed, let clients connect */
+ dev = obd->obd_lu_dev;
+ if (dev && dev->ld_ops->ldo_prepare) {
+ rc = lu_env_init(&env, dev->ld_type->ldt_ctx_tags);
+ if (rc == 0) {
+ struct lu_context session_ctx;
+
+ lu_context_init(&session_ctx, LCT_SESSION);
+ session_ctx.lc_thread = NULL;
+ lu_context_enter(&session_ctx);
+ env.le_ses = &session_ctx;
+
+ dev->ld_ops->ldo_prepare(&env, NULL, dev);
+
+ lu_env_fini(&env);
+ lu_context_exit(&session_ctx);
+ lu_context_fini(&session_ctx);
+ }
+ }
+
+ /* abort recovery only on the complete stack:
+ * many devices can be involved */
+ if ((lsi->lsi_lmd->lmd_flags & LMD_FLG_ABORT_RECOV) &&
+ (OBP(obd, iocontrol))) {
+ obd_iocontrol(OBD_IOC_ABORT_RECOVERY,
+ obd->obd_self_export, 0, NULL, NULL);
+ }
}
RETURN(rc);
int oldlen = 0;
/* Find end of nidlist */
- while (class_parse_nid(tail, &nid, &tail) == 0) {}
+ while (class_parse_nid_quiet(tail, &nid, &tail) == 0) {}
length = tail - *ptr;
if (length == 0) {
LCONSOLE_ERROR_MSG(0x159, "Can't parse NID '%s'\n", *ptr);