cifs: Identify a connection by a conn_id.
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 4 Feb 2021 07:20:46 +0000 (23:20 -0800)
committerSteve French <stfrench@microsoft.com>
Tue, 16 Feb 2021 21:48:02 +0000 (15:48 -0600)
commit6d82c27ae5d048ba9219cccdf832f8406e507d5f
tree717c9516c046f248f786515e91fcec8a7214c0b0
parent7de0394801da4f759684c4a33cf62f12da6e447d
cifs: Identify a connection by a conn_id.

Introduced a new field conn_id in TCP_Server_Info structure.
This is a non-persistent unique identifier maintained by the client
for a connection to a file server. For this, a global counter named
tcpSesNextId is maintained. On allocating a new TCP_Server_Info,
this counter is incremented and assigned.

Changed the dynamic tracepoints related to reconnects and
crediting to be more informative (with conn_id printed).
Debugging a crediting issue helped me understand the
important things to print here.

Always call dynamic tracepoints outside the scope of spinlocks.
To do this, copy out the credits and in_flight fields of the
server struct before dropping the lock.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/smb2ops.c
fs/cifs/trace.h
fs/cifs/transport.c