OBD_FREE(lmi, sizeof(*lmi));
mutex_unlock(&lustre_mount_info_lock);
+ OBD_RACE(OBD_FAIL_MDS_LLOG_UMOUNT_RACE);
RETURN(0);
}
RETURN(-ENOMEM);
}
memcpy(uuid->uuid, lwpname, strlen(lwpname));
- *exp = cfs_hash_lookup(lwp->obd_uuid_hash, uuid);
+ *exp = obd_uuid_lookup(lwp, uuid);
OBD_FREE_PTR(uuid);
}
CDEBUG(D_MOUNT, "lri reference count %u, repeat: %d\n",
atomic_read(&lri->lri_ref), repeat);
repeat++;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(cfs_time_seconds(1));
+ schedule_timeout_interruptible(cfs_time_seconds(1));
}
lustre_put_lwp_item(lri);
}
if (!is_mdc_device(devname))
break;
+ if (!(cfg->cfg_flags & CFG_F_MARKER)) {
+ CDEBUG(D_CONFIG, "Skipping add_conn for %s, rec %d\n",
+ devname, rec->lrh_index);
+ break;
+ }
+
+ /* add_conn should follow by add_uuid. This
+ * guarantee lwp device was created
+ */
+ if (!(cfg->cfg_flags & CFG_F_SKIP)) {
+ CWARN("Error at config for %s rec %d, add_conn should follow by add_uuid\n",
+ devname, rec->lrh_index);
+ break;
+ }
ptr = strrchr(devname, '-');
if (ptr == NULL)
break;
LASSERTF(type, "Server flags %d, obd %s\n", lsiflags,
obd ? obd->obd_name : "NULL");
- type_last = (type->typ_refcnt == 1);
+ type_last = (atomic_read(&type->typ_refcnt) == 1);
class_put_type(type);
if (obd != NULL && type_last) {
mti->mti_nid_count = 0;
while (LNetGetId(i++, &id) != -ENOENT) {
- if (LNET_NETTYP(LNET_NIDNET(id.nid)) == LOLND)
+ if (id.nid == LNET_NID_LO_0)
continue;
/* server use --servicenode param, only allow specified
if ((rc == -ESHUTDOWN || rc == -EIO) && ++tried < 5) {
/* The connection with MGS is not established.
* Try again after 2 seconds. Interruptable. */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(cfs_time_seconds(2));
- set_current_state(TASK_RUNNING);
+ schedule_timeout_interruptible(
+ cfs_time_seconds(2));
if (!signal_pending(current))
goto again;
}
/* hold a type reference and put it at server_stop_servers */
type = class_get_type(IS_MDT(lsi) ?
LUSTRE_MDT_NAME : LUSTRE_OST_NAME);
+ if (!type) {
+ mutex_unlock(&server_start_lock);
+ GOTO(out_stop_service, rc = -ENODEV);
+ }
lsi->lsi_server_started = 1;
mutex_unlock(&server_start_lock);
if (OBD_FAIL_PRECHECK(OBD_FAIL_OBD_STOP_MDS_RACE) &&
/* abort recovery only on the complete stack:
* many devices can be involved */
- if ((lsi->lsi_lmd->lmd_flags & LMD_FLG_ABORT_RECOV) &&
+ if ((lsi->lsi_lmd->lmd_flags &
+ (LMD_FLG_ABORT_RECOV | LMD_FLG_ABORT_RECOV_MDT)) &&
(OBP(obd, iocontrol))) {
+ struct obd_ioctl_data karg = {
+ .ioc_type = lsi->lsi_lmd->lmd_flags,
+ };
+
obd_iocontrol(OBD_IOC_ABORT_RECOVERY, obd->obd_self_export, 0,
- NULL, NULL);
+ &karg, NULL);
}
out_mgc:
*/
lsi->lsi_flags |= (lsi->lsi_lmd->lmd_flags & LMD_FLG_WRITECONF) ?
LDD_F_WRITECONF : 0;
+ lsi->lsi_flags |= (lsi->lsi_lmd->lmd_flags & LMD_FLG_NO_LOCAL_LOGS) ?
+ LDD_F_NO_LOCAL_LOGS : 0;
lsi->lsi_flags |= (lsi->lsi_lmd->lmd_flags & LMD_FLG_VIRGIN) ?
LDD_F_VIRGIN : 0;
lsi->lsi_flags |= (lsi->lsi_lmd->lmd_flags & LMD_FLG_UPDATE) ?
RETURN(0);
}
-#ifdef HAVE_SUPEROPS_USE_DENTRY
int server_show_options(struct seq_file *seq, struct dentry *dentry)
-#else
-int server_show_options(struct seq_file *seq, struct vfsmount *vfs)
-#endif
{
struct lustre_sb_info *lsi;
struct lustre_mount_data *lmd;
-#ifdef HAVE_SUPEROPS_USE_DENTRY
LASSERT(seq != NULL && dentry != NULL);
lsi = s2lsi(dentry->d_sb);
-#else
- LASSERT(seq != NULL && vfs != NULL);
- lsi = s2lsi(vfs->mnt_sb);
-#endif
-
lmd = lsi->lsi_lmd;
seq_printf(seq, ",svname=%s", lmd->lmd_profile);
/** The operations we support directly on the superblock:
* mount, umount, and df.
*/
-static struct super_operations server_ops = {
+static const struct super_operations server_ops = {
.put_super = server_put_super,
.umount_begin = server_umount_begin, /* umount -f */
.statfs = server_statfs,
server_put_super(sb);
return rc;
}
+EXPORT_SYMBOL(server_fill_super);
/*
* Calculate timeout value for a target.