smb3: allow more detailed protocol info on open files for debugging
authorSteve French <stfrench@microsoft.com>
Wed, 31 Oct 2018 00:50:31 +0000 (19:50 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 2 Nov 2018 19:09:41 +0000 (14:09 -0500)
commitdfe33f9abc08997e56f9bdf14fe9ac7ac0e14075
tree2a065362ea2a958e4c62637720dc5ad656819318
parent926674de6705f0f1dbf29a62fd758d0977f535d6
smb3: allow more detailed protocol info on open files for debugging

In order to debug complex problems it is often helpful to
have detailed information on the client and server view
of the open file information.  Add the ability for root to
view the list of smb3 open files and dump the persistent
handle and other info so that it can be more easily
correlated with server logs.

Sample output from "cat /proc/fs/cifs/open_files"

 # Version:1
 # Format:
 # <tree id> <persistent fid> <flags> <count> <pid> <uid> <filename> <mid>
 0x5 0x800000378 0x8000 1 7704 0 some-file 0x14
 0xcb903c0c 0x84412e67 0x8000 1 7754 1001 rofile 0x1a6d
 0xcb903c0c 0x9526b767 0x8000 1 7720 1000 file 0x1a5b
 0xcb903c0c 0x9ce41a21 0x8000 1 7715 0 smallfile 0xd67

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