summaryrefslogtreecommitdiffstats
path: root/fs/cifs/trace.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-09-01 01:10:17 -0500
committerSteve French <stfrench@microsoft.com>2018-10-23 21:16:03 -0500
commitb340a4d4aa18691a6d8b0e747840b0cf30dc01cb (patch)
tree577331ff750f0298ee279b24f1ec7c94e213d7d5 /fs/cifs/trace.h
parentce7fb50f92d78cf9cd35a520d293a4b791c8d7a1 (diff)
smb3: add tracepoint to catch cases where credit refund of failed op overlaps reconnect
Add tracepoint to catch potential cases where a pending operation overlapping a reconnect could fail and incorrectly refund its credits causing the client to think it has more credits available than the server thinks it does. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs/cifs/trace.h')
-rw-r--r--fs/cifs/trace.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h
index d4aed5217a56..43e5bd417b81 100644
--- a/fs/cifs/trace.h
+++ b/fs/cifs/trace.h
@@ -486,6 +486,36 @@ DEFINE_EVENT(smb3_reconnect_class, smb3_##name, \
DEFINE_SMB3_RECONNECT_EVENT(reconnect);
DEFINE_SMB3_RECONNECT_EVENT(partial_send_reconnect);
+DECLARE_EVENT_CLASS(smb3_credit_class,
+ TP_PROTO(__u64 currmid,
+ char *hostname,
+ int credits),
+ TP_ARGS(currmid, hostname, credits),
+ TP_STRUCT__entry(
+ __field(__u64, currmid)
+ __field(char *, hostname)
+ __field(int, credits)
+ ),
+ TP_fast_assign(
+ __entry->currmid = currmid;
+ __entry->hostname = hostname;
+ __entry->credits = credits;
+ ),
+ TP_printk("server=%s current_mid=0x%llx credits=%d",
+ __entry->hostname,
+ __entry->currmid,
+ __entry->credits)
+)
+
+#define DEFINE_SMB3_CREDIT_EVENT(name) \
+DEFINE_EVENT(smb3_credit_class, smb3_##name, \
+ TP_PROTO(__u64 currmid, \
+ char *hostname, \
+ int credits), \
+ TP_ARGS(currmid, hostname, credits))
+
+DEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits);
+
#endif /* _CIFS_TRACE_H */
#undef TRACE_INCLUDE_PATH