diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 1 | ||||
-rw-r--r-- | fs/cifs/trace.h | 26 | ||||
-rw-r--r-- | fs/cifs/transport.c | 2 |
3 files changed, 29 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 67f91a6313a0..d9bd10d295a9 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -348,6 +348,7 @@ cifs_reconnect(struct TCP_Server_Info *server) server->max_read = 0; cifs_dbg(FYI, "Reconnecting tcp session\n"); + trace_smb3_reconnect(server->CurrentMid, server->hostname); /* before reconnecting the tcp session, mark the smb session (uid) and the tid bad so they are not used until reconnected */ diff --git a/fs/cifs/trace.h b/fs/cifs/trace.h index 0fdf2f5c07ba..6b50b57e2416 100644 --- a/fs/cifs/trace.h +++ b/fs/cifs/trace.h @@ -423,6 +423,32 @@ DEFINE_EVENT(smb3_open_done_class, smb3_##name, \ DEFINE_SMB3_OPEN_DONE_EVENT(open_done); DEFINE_SMB3_OPEN_DONE_EVENT(posix_mkdir_done); +DECLARE_EVENT_CLASS(smb3_reconnect_class, + TP_PROTO(__u64 currmid, + char *hostname), + TP_ARGS(currmid, hostname), + TP_STRUCT__entry( + __field(__u64, currmid) + __field(char *, hostname) + ), + TP_fast_assign( + __entry->currmid = currmid; + __entry->hostname = hostname; + ), + TP_printk("server=%s current_mid=0x%llx", + __entry->hostname, + __entry->currmid) +) + +#define DEFINE_SMB3_RECONNECT_EVENT(name) \ +DEFINE_EVENT(smb3_reconnect_class, smb3_##name, \ + TP_PROTO(__u64 currmid, \ + char *hostname), \ + TP_ARGS(currmid, hostname)) + +DEFINE_SMB3_RECONNECT_EVENT(reconnect); +DEFINE_SMB3_RECONNECT_EVENT(partial_send_reconnect); + #endif /* _CIFS_TRACE_H */ #undef TRACE_INCLUDE_PATH diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 0f9156af5eb0..357d25351ffa 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -361,6 +361,8 @@ uncork: * socket so the server throws away the partial SMB */ server->tcpStatus = CifsNeedReconnect; + trace_smb3_partial_send_reconnect(server->CurrentMid, + server->hostname); } smbd_done: if (rc < 0 && rc != -EINTR) |