[PATCH 5/5] cifs: enforce nosharesock when multichannel is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>

In the current architecture, multiple sessions can
share the primary channel, but secondary channels for
each session is not shared.

This can create two problems when primary channel is
shared among several sessions. For one, there could be
uneven utilization of channels due to this skew.

Another major issue is how a cifsd thread can get to
the channel for a secondary channel. The process is
already cumbersome. We also need to find the right
session for the server struct.

To avoid both the problems, this change marks even the
primary channel as nosharesock. Secondary channels are
marked as nosharesock anyway.

We can remove this when we fix the mchan architecture
to share all channels.

Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
---
 fs/smb/client/fs_context.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
index 82eafe0815dc..e7543574ea9e 100644
--- a/fs/smb/client/fs_context.c
+++ b/fs/smb/client/fs_context.c
@@ -1043,6 +1043,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 			ctx->max_channels = 1;
 		} else {
 			ctx->multichannel = true;
+			/* enforce nosharesock */
+			ctx->nosharesock = true;
 			/* if number of channels not specified, default to 2 */
 			if (ctx->max_channels < 2)
 				ctx->max_channels = 2;
-- 
2.34.1





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux