cfs_mutex_unlock(&lustre_mount_info_lock);
- CDEBUG(D_MOUNT, "reg_mnt %p from %s, vfscount=%d\n",
- lmi->lmi_mnt, name,
- lmi->lmi_mnt ? mnt_get_count(lmi->lmi_mnt) : -1);
+ CDEBUG(D_MOUNT, "reg_mnt %p from %s\n", lmi->lmi_mnt, name);
RETURN(0);
}
RETURN(-ENOENT);
}
- CDEBUG(D_MOUNT, "dereg_mnt %p from %s, vfscount=%d\n",
- lmi->lmi_mnt, name,
- lmi->lmi_mnt ? mnt_get_count(lmi->lmi_mnt) : -1);
+ CDEBUG(D_MOUNT, "dereg_mnt %p from %s\n", lmi->lmi_mnt, name);
OBD_FREE(lmi->lmi_name, strlen(lmi->lmi_name) + 1);
cfs_list_del(&lmi->lmi_list_chain);
cfs_atomic_inc(&lsi->lsi_mounts);
- CDEBUG(D_MOUNT, "get_mnt %p from %s, refs=%d, vfscount=%d\n",
- lmi->lmi_mnt, name, cfs_atomic_read(&lsi->lsi_mounts),
- lmi->lmi_mnt ? mnt_get_count(lmi->lmi_mnt) - 1 : -1);
+ CDEBUG(D_MOUNT, "get_mnt %p from %s, refs=%d\n", lmi->lmi_mnt,
+ name, cfs_atomic_read(&lsi->lsi_mounts));
RETURN(lmi);
}
{
struct lustre_mount_info *lmi;
struct lustre_sb_info *lsi;
- int count = 0;
ENTRY;
cfs_mutex_lock(&lustre_mount_info_lock);
}
lsi = s2lsi(lmi->lmi_sb);
- CDEBUG(D_MOUNT, "put_mnt %p from %s, refs=%d, vfscount=%d\n",
- lmi->lmi_mnt, name, cfs_atomic_read(&lsi->lsi_mounts), count);
+ CDEBUG(D_MOUNT, "put_mnt %p from %s, refs=%d\n",
+ lmi->lmi_mnt, name, cfs_atomic_read(&lsi->lsi_mounts));
- if (lustre_put_lsi(lmi->lmi_sb)) {
- CDEBUG(D_MOUNT, "Last put of mnt %p from %s, vfscount=%d\n",
- lmi->lmi_mnt, name, count);
- /* last mount is the One True Mount */
- if (count > 1)
- CERROR("%s: mount busy, vfscount=%d!\n", name, count);
- }
+ if (lustre_put_lsi(lmi->lmi_sb))
+ CDEBUG(D_MOUNT, "Last put of mnt %p from %s\n",
+ lmi->lmi_mnt, name);
/* this obd should never need the mount again */
server_deregister_mount(name);
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);
/* We connect to the MGS at setup, and don't disconnect until cleanup */
data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_AT |
- OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV |
- OBD_CONNECT_MNE_SWAB;
+ OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV;
+
+#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
+ data->ocd_connect_flags |= OBD_CONNECT_MNE_SWAB;
+#else
+#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and imp_need_mne_swab"
+#endif
+
if (lmd_is_client(lsi->lsi_lmd) &&
lsi->lsi_lmd->lmd_flags & LMD_FLG_NOIR)
data->ocd_connect_flags &= ~OBD_CONNECT_IMP_RECOV;
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);