From 3e43d06810e69fdccd815bbbf5e4b50930d33ee7 Mon Sep 17 00:00:00 2001 From: Vitaly Fertman Date: Thu, 6 Jun 2019 00:17:34 +0300 Subject: [PATCH] LU-12333 ptlrpc: Add more flags to DEBUG_REQ_FLAGS macro Add rq_no_reply flag to the DEBUG_REQ_FLAGS macro for debug purposes Also, add another debug message to check_write_rcs Test-Parameters: trivial Signed-off-by: Vitaly Fertman Change-Id: I39ea7e9359a377ad46f7600edad14375f9935793 Reviewed-on: https://review.whamcloud.com/35090 Reviewed-by: Andreas Dilger Reviewed-by: Chris Horn Reviewed-by: Patrick Farrell Tested-by: Jenkins Tested-by: Maloo --- lustre/include/lustre_net.h | 4 ++-- lustre/osc/osc_request.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 38ccbde..dce8c6e 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -1277,7 +1277,7 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req) FLAG(req->rq_err, "E"), FLAG(req->rq_net_err, "e"), \ FLAG(req->rq_timedout, "X") /* eXpired */, FLAG(req->rq_resend, "S"), \ FLAG(req->rq_restart, "T"), FLAG(req->rq_replay, "P"), \ - FLAG(req->rq_no_resend, "N"), \ + FLAG(req->rq_no_resend, "N"), FLAG(req->rq_no_reply, "n"), \ FLAG(req->rq_waiting, "W"), \ FLAG(req->rq_wait_ctx, "C"), FLAG(req->rq_hp, "H"), \ FLAG(req->rq_committed, "M"), \ @@ -1285,7 +1285,7 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req) FLAG(req->rq_reply_unlinked, "U"), \ FLAG(req->rq_receiving_reply, "r") -#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" +#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" void _debug_req(struct ptlrpc_request *req, struct libcfs_debug_msg_data *data, const char *fmt, ...) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 44c7ad1..3c144a9 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1068,8 +1068,11 @@ static int check_write_rcs(struct ptlrpc_request *req, /* return error if any niobuf was in error */ for (i = 0; i < niocount; i++) { - if ((int)remote_rcs[i] < 0) - return(remote_rcs[i]); + if ((int)remote_rcs[i] < 0) { + CDEBUG(D_INFO, "rc[%d]: %d req %p\n", + i, remote_rcs[i], req); + return remote_rcs[i]; + } if (remote_rcs[i] != 0) { CDEBUG(D_INFO, "rc[%d] invalid (%d) req %p\n", -- 1.8.3.1