int err;
memset(cl, 0, sizeof(*cl));
- cl->cli_xid = 0;
+ cl->cli_xid = 1;
cl->cli_obd = NULL;
cl->cli_request_portal = req_portal;
cl->cli_reply_portal = rep_portal;
return rc;
}
-int ptlrpc_reply(struct obd_device *obddev, struct ptlrpc_request *req)
+int ptlrpc_reply(struct obd_device *obddev, struct ptlrpc_service *svc,
+ struct ptlrpc_request *req)
{
struct ptlrpc_request *clnt_req = req->rq_reply_handle;
ENTRY;
/* This is a request that came from the network via portals. */
/* FIXME: we need to increment the count of handled events */
- ptl_send_buf(req, &req->rq_peer, OST_REPLY_PORTAL, 0);
+ ptl_send_buf(req, &req->rq_peer, svc->srv_rep_portal, 0);
} else {
/* This is a local request that came from another thread. */
return 0;
}
-int ptlrpc_error(struct obd_device *obddev, struct ptlrpc_request *req)
+int ptlrpc_error(struct obd_device *obddev, struct ptlrpc_service *svc,
+ struct ptlrpc_request *req)
{
struct ptlrep_hdr *hdr;
req->rq_replen = sizeof(*hdr);
EXIT;
- return ptlrpc_reply(obddev, req);
+ return ptlrpc_reply(obddev, svc, req);
}
}
struct ptlrpc_service *ptlrpc_init_svc(__u32 bufsize,
- int portal,
+ int req_portal,
+ int rep_portal,
char *uuid,
req_unpack_t unpack,
rep_pack_t pack,
svc->srv_flags = 0;
svc->srv_buf_size = bufsize;
- svc->srv_portal = portal;
+ svc->srv_rep_portal = rep_portal;
+ svc->srv_req_portal = req_portal;
svc->srv_req_unpack = unpack;
svc->srv_rep_pack = pack;
svc->srv_handler = handler;
svc->srv_thread = NULL;
svc->srv_flags = SVC_STOPPED;
wake_up(&svc->srv_ctl_waitq);
- CERROR("svc %s: exiting\n", data->name);
+ CERROR("svc exiting process %d\n", current->pid);
return 0;
}
}
/* Attach the leading ME on which we build the ring */
- rc = PtlMEAttach(peer.peer_ni, service->srv_portal,
+ rc = PtlMEAttach(peer.peer_ni, service->srv_req_portal,
service->srv_id, 0, ~0, PTL_RETAIN,
&(service->srv_me_h[0]));