Esempio n. 1
0
static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
	int rc;
	ENTRY;

	ptlrpcd_addref();

	rc = client_obd_setup(obd, lcfg);
	if (rc)
		GOTO(err_decref, rc);

	/* liblustre only support null flavor to MGS */
	obd->u.cli.cl_flvr_mgc.sf_rpc = SPTLRPC_FLVR_NULL;

	rc = obd_llog_init(obd, &obd->obd_olg, obd, NULL);
	if (rc) {
		CERROR("failed to setup llogging subsystems\n");
		GOTO(err_cleanup, rc);
	}

	RETURN(rc);

err_cleanup:
	client_obd_cleanup(obd);
err_decref:
	ptlrpcd_decref();
	RETURN(rc);
}
Esempio n. 2
0
int ptlrpc_init_portals(void)
{
	int   rc = ptlrpc_ni_init();

	if (rc != 0) {
		CERROR("network initialisation failed\n");
		return -EIO;
	}
	rc = ptlrpcd_addref();
	if (rc == 0)
		return 0;

	CERROR("rpcd initialisation failed\n");
	ptlrpc_ni_fini();
	return rc;
}