Skip to content

RFC iomap: ->iomap_end() error handling fixes

Brian Foster linux-ext4 linux-fsdevel linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iomap: prioritize iter.status error over ->iomap_end()fs/iomap/iter.c+1 -13 replies
2/2iomap: revert the iomap_iter pos on ->iomap_end() errorfs/iomap/iter.c+19 -14 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan KaraChristoph HellwigRitesh Harjani (IBM)
1/2Diagnosed-by R-b R-b R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH RFC 0/2] iomap: ->iomap_end() error handling fixes

Hi all,

This is a couple small error handling fixes for ->iomap_end() errors (via iomap_iter()). The immediate problem here was that the ->iomap_end() error return started overriding an iter.status error code, which on ext4 happened to trigger dio fallback to buffered I/O in some cases. Jan has actually fixed that separately in ext4 [1], but I wanted to take an independent look at iomap to see if it is worth fixing as well.

The more I poked around the more it seemed like it's more appropriate to return the initial error code in iter.status if one is pending. I also eventually noticed the DAX vs. reflink case documented in patch 2, which further tweaks the error handling and supports the former reasoning.

These are separate patches because they are separate issues, but I'm still doing some testing and wanted to see if there was any initial feedback before dropping the RFC. Thoughts?

Brian

[1] https://lore.kernel.org/linux-ext4/[email protected]/

Brian Foster (2):
iomap: prioritize iter.status error over ->iomap_end()
iomap: revert the iomap_iter pos on ->iomap_end() error

 fs/iomap/iter.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0