/* In a more perfect world, we would hang a ptlrpc_client off of
* obd_type and just use the values from there. */
- if (!strcmp(name, LUSTRE_OSC_NAME)) {
+ if (!strcmp(name, LUSTRE_OSC_NAME) ||
+ (!strcmp(name, LUSTRE_OSP_NAME) &&
+ !is_osp_on_ost(lustre_cfg_buf(lcfg, 0)))) {
rq_portal = OST_REQUEST_PORTAL;
rp_portal = OSC_REPLY_PORTAL;
connect_op = OST_CONNECT;
cli->cl_sp_to = LUSTRE_SP_OST;
ns_type = LDLM_NS_TYPE_OSC;
- } else if (!strcmp(name, LUSTRE_MDC_NAME)) {
+ } else if (!strcmp(name, LUSTRE_MDC_NAME) ||
+ (!strcmp(name, LUSTRE_OSP_NAME) &&
+ is_osp_on_ost(lustre_cfg_buf(lcfg, 0)))) {
rq_portal = MDS_REQUEST_PORTAL;
rp_portal = MDC_REPLY_PORTAL;
connect_op = MDS_CONNECT;