[lustre-devel] [PATCH 12/24] lnet: extend rspt_next_hop_nid in lnet_rsp_tracker

James Simmons jsimmons at infradead.org
Tue Sep 21 19:19:49 PDT 2021


From: Mr NeilBrown <neilb at suse.de>

rspt_next_hop_nid in 'struct lnet_rsp_tracker' is now
a 'struct lnet_nid'.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: a34afe7f20ec7d618 ("LU-10391 lnet: extend rspt_next_hop_nid in lnet_rsp_tracker")
Signed-off-by: Mr NeilBrown <neilb at suse.de>
Reviewed-on: https://review.whamcloud.com/43594
Reviewed-by: James Simmons <jsimmons at infradead.org>
Reviewed-by: Chris Horn <chris.horn at hpe.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 include/linux/lnet/lib-types.h |  2 +-
 net/lnet/lnet/lib-move.c       | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/lnet/lib-types.h b/include/linux/lnet/lib-types.h
index 1e1ddd7..380a7b9 100644
--- a/include/linux/lnet/lib-types.h
+++ b/include/linux/lnet/lib-types.h
@@ -87,7 +87,7 @@ struct lnet_rsp_tracker {
 	/* cpt to lock */
 	int rspt_cpt;
 	/* nid of next hop */
-	lnet_nid_t rspt_next_hop_nid;
+	struct lnet_nid rspt_next_hop_nid;
 	/* deadline of the REPLY/ACK */
 	ktime_t rspt_deadline;
 	/* parent MD */
diff --git a/net/lnet/lnet/lib-move.c b/net/lnet/lnet/lib-move.c
index 2454a0c..f2978eb 100644
--- a/net/lnet/lnet/lib-move.c
+++ b/net/lnet/lnet/lib-move.c
@@ -1755,9 +1755,9 @@ void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
 		rspt = msg->msg_md->md_rspt_ptr;
 		if (rspt) {
 			rspt->rspt_next_hop_nid =
-				lnet_nid_to_nid4(&msg->msg_txpeer->lpni_nid);
+				msg->msg_txpeer->lpni_nid;
 			CDEBUG(D_NET, "rspt_next_hop_nid = %s\n",
-			       libcfs_nid2str(rspt->rspt_next_hop_nid));
+			       libcfs_nidstr(&rspt->rspt_next_hop_nid));
 		}
 	}
 
@@ -2969,7 +2969,7 @@ struct lnet_mt_event_info {
 			if (ktime_compare(now, rspt->rspt_deadline) >= 0 ||
 			    the_lnet.ln_mt_state == LNET_MT_STATE_SHUTDOWN) {
 				struct lnet_peer_ni *lpni;
-				lnet_nid_t nid;
+				struct lnet_nid nid;
 
 				md = lnet_handle2md(&rspt->rspt_mdh);
 				if (!md) {
@@ -3028,14 +3028,14 @@ struct lnet_mt_event_info {
 
 				CDEBUG(D_NET,
 				       "Response timeout: md = %p: nid = %s\n",
-				       md, libcfs_nid2str(nid));
+				       md, libcfs_nidstr(&nid));
 
 				/* If there is a timeout on the response
 				 * from the next hop decrement its health
 				 * value so that we don't use it
 				 */
 				lnet_net_lock(0);
-				lpni = lnet_find_peer_ni_locked(nid);
+				lpni = lnet_peer_ni_find_locked(&nid);
 				if (lpni) {
 					lnet_handle_remote_failure_locked(lpni);
 					lnet_peer_ni_decref_locked(lpni);
-- 
1.8.3.1



More information about the lustre-devel mailing list