diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2022-04-08 15:31:37 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-05-24 21:16:32 +0200 |
commit | 5752bf645f9dd7db600651f726eb04a97c9f597f (patch) | |
tree | f486c71eb05d7e37800e182d49325838ac0c2af3 /fs/cifs/cifs_debug.c | |
parent | cifs: use new enum for ses_status (diff) | |
download | linux-5752bf645f9dd7db600651f726eb04a97c9f597f.tar.xz linux-5752bf645f9dd7db600651f726eb04a97c9f597f.zip |
cifs: avoid parallel session setups on same channel
After allowing channels to reconnect in parallel, it now
becomes important to take care that multiple processes do not
call negotiate/session setup in parallel on the same channel.
This change avoids that by marking a channel as "in_reconnect".
During session setup if the channel in question has this flag
set, we return immediately.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifs_debug.c')
-rw-r--r-- | fs/cifs/cifs_debug.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index c098735d41c6..1dd995efd5b8 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -419,6 +419,8 @@ skip_rdma: spin_lock(&ses->chan_lock); if (CIFS_CHAN_NEEDS_RECONNECT(ses, 0)) seq_puts(m, "\tPrimary channel: DISCONNECTED "); + if (CIFS_CHAN_IN_RECONNECT(ses, 0)) + seq_puts(m, "\t[RECONNECTING] "); if (ses->chan_count > 1) { seq_printf(m, "\n\n\tExtra Channels: %zu ", @@ -427,6 +429,8 @@ skip_rdma: cifs_dump_channel(m, j, &ses->chans[j]); if (CIFS_CHAN_NEEDS_RECONNECT(ses, j)) seq_puts(m, "\tDISCONNECTED "); + if (CIFS_CHAN_IN_RECONNECT(ses, j)) + seq_puts(m, "\t[RECONNECTING] "); } } spin_unlock(&ses->chan_lock); |