Skip to content

Commit 1821e90

Browse files
AmanSteve French
authored andcommitted
CIFS: Propagate min offload along with other parameters from primary to secondary channels.
In a multichannel setup, it was observed that a few fields were not being copied over to the secondary channels, which impacted performance in cases where these options were relevant but not properly synchronized. To address this, this patch introduces copying the following parameters from the primary channel to the secondary channels: - min_offload - compression.requested - dfs_conn - ignore_signature - leaf_fullpath - noblockcnt - retrans - sign By copying these parameters, we ensure consistency across channels and prevent performance degradation due to missing or outdated settings. Cc: stable@vger.kernel.org Signed-off-by: Aman <aman1@microsoft.com> Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent b26df4f commit 1821e90

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

fs/smb/client/connect.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
16761676
/* Grab netns reference for this server. */
16771677
cifs_set_net_ns(tcp_ses, get_net(current->nsproxy->net_ns));
16781678

1679+
tcp_ses->sign = ctx->sign;
16791680
tcp_ses->conn_id = atomic_inc_return(&tcpSesNextId);
16801681
tcp_ses->noblockcnt = ctx->rootfs;
16811682
tcp_ses->noblocksnd = ctx->noblocksnd || ctx->rootfs;

fs/smb/client/sess.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,13 @@ cifs_ses_add_channel(struct cifs_ses *ses,
522522
ctx->sockopt_tcp_nodelay = ses->server->tcp_nodelay;
523523
ctx->echo_interval = ses->server->echo_interval / HZ;
524524
ctx->max_credits = ses->server->max_credits;
525+
ctx->min_offload = ses->server->min_offload;
526+
ctx->compress = ses->server->compression.requested;
527+
ctx->dfs_conn = ses->server->dfs_conn;
528+
ctx->ignore_signature = ses->server->ignore_signature;
529+
ctx->leaf_fullpath = ses->server->leaf_fullpath;
530+
ctx->rootfs = ses->server->noblockcnt;
531+
ctx->retrans = ses->server->retrans;
525532

526533
/*
527534
* This will be used for encoding/decoding user/domain/pw

0 commit comments

Comments
 (0)