smb: client: Update IO sizes after reconnection
authorWang Zhaolong <wangzhaolong1@huawei.com>
Mon, 31 Mar 2025 13:33:15 +0000 (21:33 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 1 Apr 2025 02:12:31 +0000 (21:12 -0500)
commit764da2fff399756d09b02db7fa7bd05e57928cc0
tree2cd8e7a909f3adb5e1b95167c344584e12524b86
parent287906b20035a04a234d1a3c64f760a5678387be
smb: client: Update IO sizes after reconnection

When a SMB connection is reset and reconnected, the negotiated IO
parameters (rsize/wsize) can become out of sync with the server's
current capabilities. This can lead to suboptimal performance or
even IO failures if the server's limits have changed.

This patch implements automatic IO size renegotiation:
1. Adds cifs_renegotiate_iosize() function to update all superblocks
   associated with a tree connection
2. Updates each mount's rsize/wsize based on current server capabilities
3. Calls this function after successful tree connection reconnection

With this change, all mount points will automatically maintain optimal
and reliable IO parameters after network disruptions, using the
bidirectional mapping added in previous patches.

This completes the series improving connection resilience by keeping
mount parameters synchronized with server capabilities.

Signed-off-by: Wang Zhaolong <wangzhaolong1@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2pdu.c