From: Steve French Date: Sun, 10 Mar 2019 02:29:55 +0000 (-0600) Subject: smb3: add dynamic tracepoint for timeout waiting for credits X-Git-Tag: v5.1-rc1~13^2~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7937ca961c847bda8a75da5d9c34efee9602f6b5;p=users%2Fhch%2Fblock.git smb3: add dynamic tracepoint for timeout waiting for credits To help debug credit starvation problems where we timeout waiting for server to grant the client credits. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky --- diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h index d8b049afa606..c78e96c4cc53 100644 --- a/fs/cifs/trace.h +++ b/fs/cifs/trace.h @@ -713,6 +713,7 @@ DEFINE_EVENT(smb3_credit_class, smb3_##name, \ TP_ARGS(currmid, hostname, credits)) DEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits); +DEFINE_SMB3_CREDIT_EVENT(credit_timeout); #endif /* _CIFS_TRACE_H */ diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index b3d04018195c..8731cfa66026 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -527,6 +527,8 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits, has_credits(server, credits, num_credits), t); cifs_num_waiters_dec(server); if (!rc) { + trace_smb3_credit_timeout(server->CurrentMid, + server->hostname, num_credits); cifs_dbg(VFS, "wait timed out after %d ms\n", timeout); return -ENOTSUPP; @@ -565,6 +567,9 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits, t); cifs_num_waiters_dec(server); if (!rc) { + trace_smb3_credit_timeout( + server->CurrentMid, + server->hostname, num_credits); cifs_dbg(VFS, "wait timed out after %d ms\n", timeout); return -ENOTSUPP;