atomic_t mds_real_clients;
struct obd_uuid mds_lmv_uuid;
struct dentry *mds_fids_dir;
+ int mds_lmv_connected;
struct dentry *mds_unnamed_dir; /* for mdt_obd_create only */
};
return 0;
}
- lmv->connected = 1;
cluuid = &lmv->cluuid;
exp = lmv->exp;
lmv_set_timeouts(obd);
class_export_put(exp);
+ lmv->connected = 1;
up(&lmv->init_sem);
return 0;
if (mdc_symlink) {
lprocfs_remove(mdc_symlink);
} else {
- CERROR("/proc/fs/lustre/%s/%s/target_obds/%s missing.",
+ CERROR("/proc/fs/lustre/%s/%s/target_obds/%s missing\n",
obd->obd_type->typ_name, obd->obd_name,
mdc_obd->obd_name);
}
if (lmv_proc_dir) {
lprocfs_remove(lmv_proc_dir);
} else {
- CERROR("/proc/fs/lustre/%s/%s/target_obds missing.",
+ CERROR("/proc/fs/lustre/%s/%s/target_obds missing\n",
obd->obd_type->typ_name, obd->obd_name);
}
/* we have to know mdsnum before touching underlying fs -bzzz */
sema_init(&mds->mds_lmv_sem, 1);
+ mds->mds_lmv_connected = 0;
if (lcfg->lcfg_inllen5 > 0 && lcfg->lcfg_inlbuf5 &&
strcmp(lcfg->lcfg_inlbuf5, "dumb")) {
class_uuid_t uuid;
if (IS_ERR(mds->mds_lmv_obd))
RETURN(PTR_ERR(mds->mds_lmv_obd));
- if (mds->mds_lmv_obd)
+ if (mds->mds_lmv_connected)
RETURN(0);
down(&mds->mds_lmv_sem);
- if (mds->mds_lmv_obd) {
+ if (mds->mds_lmv_connected) {
up(&mds->mds_lmv_sem);
RETURN(0);
}
if (rc)
GOTO(err_reg, rc);
+ mds->mds_lmv_connected = 1;
up(&mds->mds_lmv_sem);
RETURN(0);
down(&mds->mds_lmv_sem);
if (!IS_ERR(mds->mds_lmv_obd) && mds->mds_lmv_exp != NULL) {
+ LASSERT(mds->mds_lmv_connected != 0);
+ mds->mds_lmv_connected = 0;
obd_register_observer(mds->mds_lmv_obd, NULL);
/* if obd_disconnect fails (probably because the export was