Commit 7937ca96 authored by Steve French's avatar Steve French

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: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
parent ffd1ef1e
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment