Because seq allocation(osp_init_pre_fid) might be stuck
during RPC, move it out of osp_import_event, which is
inside ptlrpcd_rcv. Otherwise, some other import RPCs(like
connect req)might be blocked in ptlrpcd_rcv.
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ib4014f8b0088ea3613fa4d53d3e274f5bdfe70c7
Reviewed-on: http://review.whamcloud.com/8997
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
static int osp_prepare_fid_client(struct osp_device *osp)
{
static int osp_prepare_fid_client(struct osp_device *osp)
{
LASSERT(osp->opd_obd->u.cli.cl_seq != NULL);
if (osp->opd_obd->u.cli.cl_seq->lcs_exp != NULL)
return 0;
LASSERT(osp->opd_obd->u.cli.cl_seq != NULL);
if (osp->opd_obd->u.cli.cl_seq->lcs_exp != NULL)
return 0;
LASSERT(osp->opd_exp != NULL);
osp->opd_obd->u.cli.cl_seq->lcs_exp =
class_export_get(osp->opd_exp);
LASSERT(osp->opd_exp != NULL);
osp->opd_obd->u.cli.cl_seq->lcs_exp =
class_export_get(osp->opd_exp);
- if (osp->opd_pre == NULL)
- return 0;
-
- /* Init fid for osp_precreate if necessary */
- rc = osp_init_pre_fid(osp);
- if (rc != 0) {
- class_export_put(osp->opd_exp);
- osp->opd_obd->u.cli.cl_seq->lcs_exp = NULL;
- CERROR("%s: init pre fid error: rc = %d\n",
- osp->opd_obd->obd_name, rc);
- return rc;
- }
-
if (d->opd_obd->u.cli.cl_seq->lcs_exp == NULL)
continue;
if (d->opd_obd->u.cli.cl_seq->lcs_exp == NULL)
continue;
+ /* Init fid for osp_precreate if necessary */
+ rc = osp_init_pre_fid(d);
+ if (rc != 0) {
+ class_export_put(d->opd_exp);
+ d->opd_obd->u.cli.cl_seq->lcs_exp = NULL;
+ CERROR("%s: init pre fid error: rc = %d\n",
+ d->opd_obd->obd_name, rc);
+ continue;
+ }
+