Whamcloud - gitweb
LU-10391 ptlrpc: change rq_self to struct lnet_nid
[fs/lustre-release.git] / lustre / ptlrpc / events.c
index b4956cc..5e9550c 100644 (file)
@@ -350,7 +350,7 @@ void request_in_callback(struct lnet_event *ev)
        /* Multi-Rail: keep track of both initiator and source NID. */
        req->rq_peer = lnet_pid_to_pid4(&ev->initiator);
        req->rq_source = lnet_pid_to_pid4(&ev->source);
-       req->rq_self = lnet_nid_to_nid4(&ev->target.nid);
+       req->rq_self = ev->target.nid;
        req->rq_rqbd = rqbd;
        req->rq_phase = RQ_PHASE_NEW;
        if (ev->type == LNET_EVENT_PUT)
@@ -527,7 +527,8 @@ static void ptlrpc_master_callback(struct lnet_event *ev)
 }
 
 int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
-                       struct lnet_process_id *peer, lnet_nid_t *self)
+                       struct lnet_process_id *peer,
+                       struct lnet_nid *self)
 {
        int best_dist = 0;
        __u32 best_order = 0;
@@ -550,8 +551,9 @@ int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
                if (dist < 0)
                        continue;
 
-               if (dist == 0) {                /* local! use loopback LND */
-                       peer->nid = *self = LNET_NID_LO_0;
+               if (dist == 0) {                /* local! use loopback LND */
+                       peer->nid = LNET_NID_LO_0;
+                       lnet_nid4_to_nid(peer->nid, self);
                        rc = 0;
                        break;
                }
@@ -563,7 +565,7 @@ int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
                        best_order = order;
 
                        peer->nid = lnet_nid_to_nid4(&dst_nid);
-                       *self = lnet_nid_to_nid4(&src_nid);
+                       *self = src_nid;
                        rc = 0;
                }
        }