diff mbox series

[26/27] lustre: ptlrpc: OBD_FAIL_PTLRPC_DELAY_SEND_FAIL fixes

Message ID 20250321130711.3257092-27-jsimmons@infradead.org (mailing list archive)
State New
Headers show
Series lustre: sync to OpenSFS tree July 27, 2023 | expand

Commit Message

James Simmons March 21, 2025, 1:07 p.m. UTC
From: Chris Horn <chris.horn@hpe.com>

Modify test to ensure idle disconnect is enabled for all targets
except OST0000. This prevents an issue where an idle ping is sent to
another target instead of OST0000.

Re-work test to check the debug log for all relevant messages.

Added a debug statement to ptl_send_rpc(), and moved an existing one,
to faciliate debugging any future test failures.

Fixes: ecba969 ("lustre: ptlrpc: Track highest reply XID")
WC-bug-id: https://jira.whamcloud.com/browse/LU-16843
Lustre-commit: fdfdf5c05cf642940 ("LU-16483 tests: replay-single test_200 fixes")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50891
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/ptlrpc/niobuf.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/ptlrpc/niobuf.c b/fs/lustre/ptlrpc/niobuf.c
index d426d3c678b7..e06857376019 100644
--- a/fs/lustre/ptlrpc/niobuf.c
+++ b/fs/lustre/ptlrpc/niobuf.c
@@ -726,12 +726,15 @@  int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
 	request->rq_deadline = request->rq_sent + request->rq_timeout +
 			       ptlrpc_at_get_net_latency(request);
 
+	DEBUG_REQ(D_INFO, request, "send flags=%x",
+		  lustre_msg_get_flags(request->rq_reqmsg));
+
 	if (unlikely(opc == OBD_PING &&
-	    CFS_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND_FAIL, cfs_fail_val)))
+	    CFS_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND_FAIL, cfs_fail_val))) {
+		DEBUG_REQ(D_INFO, request, "Simulate delay send failure");
 		goto skip_send;
+	}
 
-	DEBUG_REQ(D_INFO, request, "send flags=%x",
-		  lustre_msg_get_flags(request->rq_reqmsg));
 	rc = ptl_send_buf(&request->rq_req_md_h,
 			  request->rq_reqbuf, request->rq_reqdata_len,
 			  LNET_NOACK_REQ, &request->rq_req_cbid,