diff options
| author | Paulo Alcantara <pc@manguebit.org> | 2026-10-28 23:07:14 -0300 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-11-09 12:35:39 -0300 |
| commit | bb203c9af62adb59d82e8ecb715e778329e3b771 (patch) | |
| tree | b198455d50d3f14a0a034811013cc09d8fa11375 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 274dec866f0882ee5a0f3d58d4d5c31af0c02417 (diff) | |
smb: client: don't retry failed writes forever regardless of mount options
smb2_writev_callback() marks a write for retry whenever the server fails
it with a replayable status, ignoring smb2_should_replay() and so the
hard and retrans mount options. The latter is only used to decide on a
backoff, so on a soft mount with no retrans, a server that keeps failing
a write with e.g. STATUS_INSUFFICIENT_RESOURCES gets it resent forever,
thousands of times per second, hanging anything waiting on its
writeback:
smb3_write_err: R=005c359e[2] ... offset=0x27000 len=0xfdf0 rc=-11
(569410 times in 255 seconds, same subrequest, no growing delay)
Only retry such writes when cifs_io_should_replay() allows it, as already
done for send errors in smb2_async_writev(), otherwise let them fail.
Writeback thus keeps retrying them with backoff, within its retry
window. Base the decision on the result of this attempt rather than on
wdata->result, which is never reset on success and may hold the error of
a previous attempt.
Writes cut short by a reconnect get retried regardless too. Have
writeback ones go through cifs_io_should_replay() as well, so that they
back off and soft mounts give up on them after the retry window, as on
other replayable errors. Other writes cut short keep being retried,
without spending the mount's retries, but as replays, since they may
have reached the server, unless umount -f stopped them, which fails them
with -EIO.
Fixes: 2c1238a7477a ("cifs: make retry logic in read/write path consistent with other paths")
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
