preserve prepare_write errno across write reissue
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyIn review
- v12 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- KUnit: allocate netfs_io_request / netfs_io_subrequest with kunit_kzalloc() to fix ARM allyesconfig -Wframe-larger-than= (kernel test robot).
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | netfs: preserve prepare_write errno on reissuefs/ | +3 | 1 reply | |
| 2/2 | netfs: add KUnit coverage for reissue prepare_write errnofs/ fs/ fs/ +2 more | +98 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH netfs v2 0/2] preserve prepare_write errno across write reissue
cifs (and others) may fail in prepare_write() with netfs_prepare_write_failed() before write_retry calls netfs_reissue_write(). Since 82e8885bd763, reissue clears subreq->error to 0 for a clean I/O retry, so a FAILED subreq is terminated with 0. The collector then does mapping_set_error(0), which is a no-op — writeback errno is lost (not an infinite retry).
Patch 1 skips that clear when FAILED is already set. Patch 2 adds a KUnit stub test: FAIL unpatched, PASS patched.
./tools/testing/kunit/kunit.py run --kunitconfig=fs/netfs/.kunitconfig \
netfs_reissue_write*
Changes in v2:
- KUnit: allocate netfs_io_request / netfs_io_subrequest with kunit_kzalloc() to fix ARM allyesconfig -Wframe-larger-than= (kernel test robot).
No prior lore report found for this interaction; surfaces on top of Shyam's NEED_RETRY change.
Iván Ezequiel Rodriguez (2):
netfs: preserve prepare_write errno on reissue
netfs: add KUnit coverage for reissue prepare_write errno
fs/netfs/.kunitconfig | 3 ++ fs/netfs/Kconfig | 9 ++++ fs/netfs/Makefile | 2 + fs/netfs/write_collect.c | 4 ++ fs/netfs/write_issue.c | 4 +- fs/netfs/write_reissue_kunit.c | 80 ++++++++++++++++++++++++++++++++++ 6 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 fs/netfs/.kunitconfig create mode 100644 fs/netfs/write_reissue_kunit.c
Signature · 1 line
2.43.0