Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 1/2] cifs: client: force multichannel=off when max_channels=1
@ 2025-09-22  8:24 rajasimandalos
  2025-09-22  8:24 ` [PATCH 2/2] cifs: client: allow changing multichannel mount options on remount rajasimandalos
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: rajasimandalos @ 2025-09-22  8:24 UTC (permalink / raw)
  To: linux-cifs
  Cc: sfrench, pc, ronniesahlberg, sprasad, tom, bharathsm,
	linux-kernel, Rajasi Mandal

From: Rajasi Mandal <rajasimandal@microsoft.com>

Previously, specifying both multichannel and max_channels=1 as mount
options would leave multichannel enabled, even though it is not
meaningful when only one channel is allowed. This led to confusion and
inconsistent behavior, as the client would advertise multichannel
capability but never establish secondary channels.

Fix this by forcing multichannel to false whenever max_channels=1,
ensuring the mount configuration is consistent and matches user intent.
This prevents the client from advertising or attempting multichannel
support when it is not possible.

Signed-off-by: Rajasi Mandal <rajasimandal@microsoft.com>
---
 fs/smb/client/fs_context.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
index 072383899e81..43552b44f613 100644
--- a/fs/smb/client/fs_context.c
+++ b/fs/smb/client/fs_context.c
@@ -1820,6 +1820,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
 		goto cifs_parse_mount_err;
 	}
 
+	/*
+	 * Multichannel is not meaningful if max_channels is 1.
+	 * Force multichannel to false to ensure consistent configuration.
+	 */
+	if (ctx->multichannel && ctx->max_channels == 1)
+		ctx->multichannel = false;
+
 	return 0;
 
  cifs_parse_mount_err:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-09-23 18:12 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22  8:24 [PATCH 1/2] cifs: client: force multichannel=off when max_channels=1 rajasimandalos
2025-09-22  8:24 ` [PATCH 2/2] cifs: client: allow changing multichannel mount options on remount rajasimandalos
2025-09-22 15:12   ` Enzo Matsumiya
2025-09-23  6:04     ` Shyam Prasad N
     [not found]     ` <CAEY6_V3RanNnjd=QkaZO=QoLLfiOhRGg7cCxHe2xGB1A05hEhQ@mail.gmail.com>
2025-09-23 17:32       ` Enzo Matsumiya
     [not found]         ` <CAH2r5msS2hrFOhjGddNUrAU3ZTSPyVwLv8w5c39cNKeH2MdgqA@mail.gmail.com>
2025-09-23 18:01           ` Enzo Matsumiya
     [not found]             ` <CAH2r5ms3W5S5tozMAk2NUj6tBEb=OCFK=OTO+TcYrmu_vncGTw@mail.gmail.com>
2025-09-23 18:12               ` Enzo Matsumiya
2025-09-22 21:11   ` Henrique Carvalho
2025-09-23  6:12     ` Shyam Prasad N
2025-09-23 14:21       ` Enzo Matsumiya
2025-09-22 14:41 ` [PATCH 1/2] cifs: client: force multichannel=off when max_channels=1 Henrique Carvalho
2025-09-22 14:59   ` Enzo Matsumiya
2025-09-22 16:14     ` Steve French
2025-09-22 17:15       ` Henrique Carvalho
2025-09-22 18:52         ` Enzo Matsumiya
2025-09-22 19:21           ` Henrique Carvalho
2025-09-23  5:38     ` Shyam Prasad N
2025-09-23 14:12       ` Enzo Matsumiya
2025-09-22 15:48 ` Steve French
2025-09-23  5:50   ` Shyam Prasad N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox