From: Thiago Rafael Becker <thiago.becker@gmail.com>
To: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org
Cc: trond.myklebust@primarydata.com, anna.schumaker@netapp.com,
bfields@fieldses.org, jlayton@kernel.org, davem@davemloft.net,
Thiago Rafael Becker <thiago.becker@gmail.com>
Subject: [PATCH] sunrpc: Add task's xid to 'not responding' messages on call_timeout
Date: Fri, 9 Feb 2018 23:06:28 -0200 [thread overview]
Message-ID: <20180210010628.19792-1-thiago.becker@gmail.com> (raw)
When investigating reasons for nfs failures, packet dumps arei eventually used.
Finding the rpc that generated the failure is done by comparing all sent
rpc calls and all received rpc replies for those which are unanswered,
which is prone to errors like
- Slow server responses
- Incomplete and uncaptured packets in the packet dump
- The heuristics used to inspect packets failing to interpret one
This patch adds the xid of rpc_tasks to the 'not responding' messages
in call_timeout to make these analysis more precise.
Signed-off-by: Thiago Rafael Becker <thiago.becker@gmail.com>
---
net/sunrpc/clnt.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index e2a4184f3c5d..83c8aca951f4 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2214,9 +2214,10 @@ call_timeout(struct rpc_task *task)
}
if (RPC_IS_SOFT(task)) {
if (clnt->cl_chatty) {
- printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
+ printk(KERN_NOTICE "%s: server %s not responding, timed out (xid: %x)\n",
clnt->cl_program->name,
- task->tk_xprt->servername);
+ task->tk_xprt->servername,
+ be32_to_cpu(task->tk_rqstp->rq_xid));
}
if (task->tk_flags & RPC_TASK_TIMEOUT)
rpc_exit(task, -ETIMEDOUT);
@@ -2228,9 +2229,10 @@ call_timeout(struct rpc_task *task)
if (!(task->tk_flags & RPC_CALL_MAJORSEEN)) {
task->tk_flags |= RPC_CALL_MAJORSEEN;
if (clnt->cl_chatty) {
- printk(KERN_NOTICE "%s: server %s not responding, still trying\n",
+ printk(KERN_NOTICE "%s: server %s not responding, still trying (xid: %x)\n",
clnt->cl_program->name,
- task->tk_xprt->servername);
+ task->tk_xprt->servername,
+ be32_to_cpu(task->tk_rqstp->rq_xid));
}
}
rpc_force_rebind(clnt);
--
2.14.3
next reply other threads:[~2018-02-10 1:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-10 1:06 Thiago Rafael Becker [this message]
2018-02-10 1:41 ` Trond Myklebust
2018-02-12 16:54 ` bfields
2018-02-12 18:28 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180210010628.19792-1-thiago.becker@gmail.com \
--to=thiago.becker@gmail.com \
--cc=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=davem@davemloft.net \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome