linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iomap: ->iomap_end() error handling fixes
@ 2025-10-02 17:20 Brian Foster
  2025-10-02 17:20 ` [PATCH v2 1/2] iomap: prioritize iter.status error over ->iomap_end() Brian Foster
  2025-10-02 17:20 ` [PATCH v2 2/2] iomap: revert the iomap_iter pos on ->iomap_end() error Brian Foster
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Foster @ 2025-10-02 17:20 UTC (permalink / raw)
  To: linux-fsdevel, linux-ext4, linux-xfs; +Cc: Christian Brauner

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. This has
survived my testing since the RFC was posted and some Reviewed-by's have
trickled in, so there are no real changes for v1 other than adding those
tags. Thoughts, reviews, flames appreciated.

Brian

[1] https://lore.kernel.org/linux-ext4/20250901112739.32484-2-jack@suse.cz/

v2:
- Added more R-b tags.
v1: https://lore.kernel.org/linux-fsdevel/20250908130102.101790-1-bfoster@redhat.com/
- Added R-b tags.
rfc: https://lore.kernel.org/linux-fsdevel/20250902150755.289469-1-bfoster@redhat.com/

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(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-02 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 17:20 [PATCH v2 0/2] iomap: ->iomap_end() error handling fixes Brian Foster
2025-10-02 17:20 ` [PATCH v2 1/2] iomap: prioritize iter.status error over ->iomap_end() Brian Foster
2025-10-02 17:20 ` [PATCH v2 2/2] iomap: revert the iomap_iter pos on ->iomap_end() error Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).