RETURN(rc);
}
-int osp_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
- struct md_op_data *op_data)
+int osp_fid_alloc(const struct lu_env *env, struct obd_export *exp,
+ struct lu_fid *fid, struct md_op_data *op_data)
{
- struct client_obd *cli = &exp->exp_obd->u.cli;
- struct lu_client_seq *seq = cli->cl_seq;
-
+ struct client_obd *cli = &exp->exp_obd->u.cli;
+ struct osp_device *osp = lu2osp_dev(exp->exp_obd->obd_lu_dev);
+ struct lu_client_seq *seq = cli->cl_seq;
ENTRY;
- RETURN(seq_client_alloc_fid(NULL, seq, fid));
+
+ LASSERT(osp->opd_obd->u.cli.cl_seq != NULL);
+ /* Sigh, fid client is not ready yet */
+ if (osp->opd_obd->u.cli.cl_seq->lcs_exp == NULL)
+ RETURN(-ENOTCONN);
+
+ RETURN(seq_client_alloc_fid(env, seq, fid));
}
/* context key constructor/destructor: mdt_key_init, mdt_key_fini */