]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
smb3: add tracepoint for session expired or deleted
authorSteve French <stfrench@microsoft.com>
Mon, 30 Jul 2018 19:23:58 +0000 (14:23 -0500)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Aug 2018 19:15:57 +0000 (14:15 -0500)
In debugging reconnection problems, want to be able to more easily
trace cases in which the server has marked the SMB3 session
expired or deleted (to distinguish from timeout cases).

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/smb2ops.c
fs/cifs/trace.h

index dad6dc7632004ceafc4034f133e4caf9595ea482..314556c083f320c5e1c0422e4c09bb3ed053ae30 100644 (file)
@@ -1483,7 +1483,11 @@ smb2_is_session_expired(char *buf)
            shdr->Status != STATUS_USER_SESSION_DELETED)
                return false;
 
+       trace_smb3_ses_expired(shdr->TreeId, shdr->SessionId,
+                              le16_to_cpu(shdr->Command),
+                              le64_to_cpu(shdr->MessageId));
        cifs_dbg(FYI, "Session expired or deleted\n");
+
        return true;
 }
 
index 67e413f6ee4d8fd1dbd1eede0a7b0a9e6442a9e3..0fdf2f5c07ba997218d49b16cab904cf51b8432b 100644 (file)
@@ -281,6 +281,7 @@ DEFINE_EVENT(smb3_cmd_done_class, smb3_##name,    \
        TP_ARGS(tid, sesid, cmd, mid))
 
 DEFINE_SMB3_CMD_DONE_EVENT(cmd_done);
+DEFINE_SMB3_CMD_DONE_EVENT(ses_expired);
 
 DECLARE_EVENT_CLASS(smb3_exit_err_class,
        TP_PROTO(unsigned int xid,