diff options
author | Steve French <stfrench@microsoft.com> | 2018-10-30 19:50:31 -0500 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-11-02 14:09:41 -0500 |
commit | dfe33f9abc08997e56f9bdf14fe9ac7ac0e14075 (patch) | |
tree | 2a065362ea2a958e4c62637720dc5ad656819318 /fs/cifs/smb2pdu.c | |
parent | 926674de6705f0f1dbf29a62fd758d0977f535d6 (diff) | |
download | linux-stable-dfe33f9abc08997e56f9bdf14fe9ac7ac0e14075.tar.gz linux-stable-dfe33f9abc08997e56f9bdf14fe9ac7ac0e14075.tar.bz2 linux-stable-dfe33f9abc08997e56f9bdf14fe9ac7ac0e14075.zip |
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>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index a92d3840db9d..27f86537a5d1 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -2309,6 +2309,9 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path, atomic_inc(&tcon->num_remote_opens); oparms->fid->persistent_fid = rsp->PersistentFileId; oparms->fid->volatile_fid = rsp->VolatileFileId; +#ifdef CONFIG_CIFS_DEBUG2 + oparms->fid->mid = le64_to_cpu(rsp->sync_hdr.MessageId); +#endif /* CIFS_DEBUG2 */ if (buf) { memcpy(buf, &rsp->CreationTime, 32); |