]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: track individual channel status using chans_need_reconnect
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 19 Jul 2021 12:46:53 +0000 (12:46 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 3 Jan 2022 02:38:46 +0000 (20:38 -0600)
commit0b317db852c1c98d6efad1f3a16306a93e62cda6
tree1de9314a0edcfd133b19d83dc9cddc6772a77c2d
parent4f9c2afcc2298833cef9958e60e150368576ba77
cifs: track individual channel status using chans_need_reconnect

We needed a way to identify the channels under the smb session
which are in reconnect, so that the traffic to other channels
can continue. So I replaced the bool need_reconnect with
a bitmask identifying all the channels that need reconnection
(named chans_need_reconnect). When a channel needs reconnection,
the bit corresponding to the index of the server in ses->chans
is used to set this bitmask. Checking if no channels or all
the channels need reconnect then becomes very easy.

Also wrote some helper macros for checking and setting the bits.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/sess.c
fs/cifs/smb2pdu.c