]> git.ipfire.org Git - thirdparty/linux.git/commit
cifs: make retry logic in read/write path consistent with other paths
authorShyam Prasad N <sprasad@microsoft.com>
Sat, 31 Jan 2026 08:33:06 +0000 (14:03 +0530)
committerSteve French <stfrench@microsoft.com>
Sun, 8 Feb 2026 23:07:43 +0000 (17:07 -0600)
commit2c1238a7477a2e76a49161937fc20a04c74dbd76
tree96ff22775031da207efe6cf6659326316be551e1
parenta5ca32d031bbba5160e1f555aabb75a3f40f918d
cifs: make retry logic in read/write path consistent with other paths

Today in most other code paths in cifs.ko, the decision of whether
to retry a command depends on two mount options: retrans and hard.
However, the read/write code paths diverged from this and would only
retry if the error returned was -EAGAIN. However, there are other
replayable errors in cifs.ko, for which is_replayable_errors helper
was written. This change makes read/write codepaths consistent with
other code-paths.

This change also does the following:
1. The SMB2 read/write code diverged significantly (presumably since
they were changed during netfs refactor at different times). This
changes the response verification logic to be consistent.
2. Moves the netfs tracepoints to slightly different locations in order
to make debugging easier.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/smb2pdu.c