diff mbox series

[06/24] lustre: ptlrpc: change bd_sender in ptlrpc_bulk_frag_ops

Message ID 1663478534-19917-7-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to 2.15.52 | expand

Commit Message

James Simmons Sept. 18, 2022, 5:21 a.m. UTC
From: Mr NeilBrown <neilb@suse.de>

bd_sender in struct ptlrpc_bulk_frag_ops is now 'struct lnet_nid'.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10391
Lustre-commit: d096ca267bb74fa3e1 ("LU-10391 ptlrpc: change bd_sender in ptlrpc_bulk_frag_ops")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/44640
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/include/lustre_net.h | 2 +-
 fs/lustre/osc/osc_request.c    | 4 ++--
 fs/lustre/ptlrpc/events.c      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/include/lustre_net.h b/fs/lustre/include/lustre_net.h
index d9aa530..f8d2861 100644
--- a/fs/lustre/include/lustre_net.h
+++ b/fs/lustre/include/lustre_net.h
@@ -1211,7 +1211,7 @@  struct ptlrpc_bulk_desc {
 	u64				bd_last_mbits;
 
 	struct ptlrpc_cb_id		bd_cbid;	/* network callback info */
-	lnet_nid_t			bd_sender;	/* stash event::sender */
+	struct lnet_nid			bd_sender;	/* stash event::sender */
 	int				bd_md_count;	/* # valid entries in bd_mds */
 	int				bd_md_max_brw;	/* max entries in bd_mds */
 
diff --git a/fs/lustre/osc/osc_request.c b/fs/lustre/osc/osc_request.c
index d66185b..7577fad 100644
--- a/fs/lustre/osc/osc_request.c
+++ b/fs/lustre/osc/osc_request.c
@@ -2253,9 +2253,9 @@  static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
 			goto out;
 
 		if (req->rq_bulk &&
-		    lnet_nid_to_nid4(&peer->nid) != req->rq_bulk->bd_sender) {
+		    !nid_same(&peer->nid, &req->rq_bulk->bd_sender)) {
 			via = " via ";
-			router = libcfs_nid2str(req->rq_bulk->bd_sender);
+			router = libcfs_nidstr(&req->rq_bulk->bd_sender);
 		}
 
 		if (server_cksum != client_cksum) {
diff --git a/fs/lustre/ptlrpc/events.c b/fs/lustre/ptlrpc/events.c
index e6313af..17ef775 100644
--- a/fs/lustre/ptlrpc/events.c
+++ b/fs/lustre/ptlrpc/events.c
@@ -213,7 +213,7 @@  void client_bulk_callback(struct lnet_event *ev)
 
 	if (ev->type != LNET_EVENT_UNLINK && ev->status == 0) {
 		desc->bd_nob_transferred += ev->mlength;
-		desc->bd_sender = lnet_nid_to_nid4(&ev->sender);
+		desc->bd_sender = ev->sender;
 	} else {
 		/* start reconnect and resend if network error hit */
 		spin_lock(&req->rq_lock);