Whamcloud - gitweb
- more small fixes
authorbraam <braam>
Thu, 28 Feb 2002 22:24:06 +0000 (22:24 +0000)
committerbraam <braam>
Thu, 28 Feb 2002 22:24:06 +0000 (22:24 +0000)
lustre/ptlrpc/client.c
lustre/ptlrpc/niobuf.c
lustre/ptlrpc/service.c

index c5925f4..3a64421 100644 (file)
@@ -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;
index 6e24d23..debc382 100644 (file)
@@ -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);
 }
 
 
index 89830f1..7088d00 100644 (file)
@@ -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]));