From 8f2beca7734913d015357cad54c5c778e3f306e4 Mon Sep 17 00:00:00 2001 From: braam Date: Thu, 28 Feb 2002 22:24:06 +0000 Subject: [PATCH] - more small fixes --- lustre/ptlrpc/client.c | 2 +- lustre/ptlrpc/niobuf.c | 10 ++++++---- lustre/ptlrpc/service.c | 10 ++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index c5925f4..3a64421 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -73,7 +73,7 @@ int ptlrpc_connect_client(int dev, char *uuid, int req_portal, int rep_portal, 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; diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index 6e24d23..debc382 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -90,7 +90,8 @@ int ptl_send_buf(struct ptlrpc_request *request, struct lustre_peer *peer, 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; @@ -99,7 +100,7 @@ int ptlrpc_reply(struct obd_device *obddev, struct ptlrpc_request *req) /* 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. */ @@ -121,7 +122,8 @@ int ptlrpc_reply(struct obd_device *obddev, struct ptlrpc_request *req) 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; @@ -148,7 +150,7 @@ int ptlrpc_error(struct obd_device *obddev, struct ptlrpc_request *req) req->rq_replen = sizeof(*hdr); EXIT; - return ptlrpc_reply(obddev, req); + return ptlrpc_reply(obddev, svc, req); } diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 89830f1..7088d00 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -81,7 +81,8 @@ static int ptlrpc_check_event(struct ptlrpc_service *svc) } 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, @@ -108,7 +109,8 @@ struct ptlrpc_service *ptlrpc_init_svc(__u32 bufsize, 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; @@ -203,7 +205,7 @@ static int ptlrpc_main(void *arg) 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; } @@ -270,7 +272,7 @@ int rpc_register_service(struct ptlrpc_service *service, char *uuid) } /* 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])); -- 1.8.3.1