Commit 74566de
committed
smb: client: fix zero rsize error messages
JIRA: https://issues.redhat.com/browse/RHEL-104401
Conflicts:
- Code difference due to lack of netfslib support in RHEL 9.7.
The equivalent cifs_prepare_read() function in RHEL 9.7 is
cifs_send_async_read(), so place the changes there instead.
commit 3965c23
Author: Paulo Alcantara <[email protected]>
Date: Mon May 12 14:58:36 2025 -0300
smb: client: fix zero rsize error messages
cifs_prepare_read() might be called with a disconnected channel, where
TCP_Server_Info::max_read is set to zero due to reconnect, so calling
->negotiate_rize() will set @rsize to default min IO size (64KiB) and
then logging
CIFS: VFS: SMB: Zero rsize calculated, using minimum value
65536
If the reconnect happens in cifsd thread, cifs_renegotiate_iosize()
will end up being called and then @rsize set to the expected value.
Since we can't rely on the value of @server->max_read by the time we
call cifs_prepare_read(), try to ->negotiate_rize() only if
@cifs_sb->ctx->rsize is zero.
Reported-by: Steve French <[email protected]>
Fixes: c59f7c9 ("smb: client: ensure aligned IO sizes")
Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
Signed-off-by: Steve French <[email protected]>
Signed-off-by: Paulo Alcantara <[email protected]>1 parent 270010b commit 74566de
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4185 | 4185 | | |
4186 | 4186 | | |
4187 | 4187 | | |
4188 | | - | |
4189 | | - | |
| 4188 | + | |
| 4189 | + | |
| 4190 | + | |
| 4191 | + | |
4190 | 4192 | | |
4191 | 4193 | | |
4192 | 4194 | | |
| |||
0 commit comments