aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2021-07-19 14:14:46 +0000
committerSteve French <stfrench@microsoft.com>2022-01-02 20:38:46 -0600
commit183eea2ee5ba968ca7c31f04a0f01fd3e5c1d014 (patch)
tree20dc850ec99d6b5b18ce7621bf4e4bcb5d95237f /fs/cifs/cifsglob.h
parentcifs: add WARN_ON for when chan_count goes below minimum (diff)
downloadlinux-dev-183eea2ee5ba968ca7c31f04a0f01fd3e5c1d014.tar.xz
linux-dev-183eea2ee5ba968ca7c31f04a0f01fd3e5c1d014.zip
cifs: reconnect only the connection and not smb session where possible
With the new per-channel bitmask for reconnect, we have an option to reconnect the tcp session associated with the channel without reconnecting the smb session. i.e. if there are still channels to operate on, we can continue to use the smb session and tcon. However, there are cases where it makes sense to reconnect the smb session even when there are active channels underneath. For example for SMB session expiry. With this patch, we'll have an option to do either, and use the correct option for specific cases. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 76b4adc7d738..23d76ae713f0 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -973,6 +973,8 @@ struct cifs_ses {
((1UL << (ses)->chan_count) - 1)
#define CIFS_ALL_CHANS_NEED_RECONNECT(ses) \
((ses)->chans_need_reconnect == CIFS_ALL_CHANNELS_SET(ses))
+#define CIFS_SET_ALL_CHANS_NEED_RECONNECT(ses) \
+ ((ses)->chans_need_reconnect = CIFS_ALL_CHANNELS_SET(ses))
#define CIFS_CHAN_NEEDS_RECONNECT(ses, index) \
test_bit((index), &(ses)->chans_need_reconnect)