From: Brian Foster <bfoster@redhat.com>
To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-xfs@vger.kernel.org
Cc: jack@suse.cz, djwong@kernel.org
Subject: [PATCH RFC 0/2] iomap: ->iomap_end() error handling fixes
Date: Tue, 2 Sep 2025 11:07:53 -0400 [thread overview]
Message-ID: <20250902150755.289469-1-bfoster@redhat.com> (raw)
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/20250901112739.32484-2-jack@suse.cz/
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
next reply other threads:[~2025-09-02 15:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 15:07 Brian Foster [this message]
2025-09-02 15:07 ` [PATCH RFC 1/2] iomap: prioritize iter.status error over ->iomap_end() Brian Foster
2025-09-03 6:09 ` Christoph Hellwig
2025-09-03 11:04 ` Jan Kara
2025-09-06 4:23 ` Ritesh Harjani
2025-09-02 15:07 ` [PATCH RFC 2/2] iomap: revert the iomap_iter pos on ->iomap_end() error Brian Foster
2025-09-02 21:11 ` Joanne Koong
2025-09-03 12:18 ` Brian Foster
2025-09-03 18:31 ` Joanne Koong
2025-09-03 13:38 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250902150755.289469-1-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=djwong@kernel.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).