From: Brian Foster <bfoster@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, Christoph Hellwig <hch@infradead.org>
Subject: [PATCH v3 0/7] iomap: incremental per-operation iter advance
Date: Thu, 30 Jan 2025 12:09:41 -0500 [thread overview]
Message-ID: <20250130170949.916098-1-bfoster@redhat.com> (raw)
Hi all,
Here's v3 of the iomap incremental advance series. The most notable
changes in this version are some type fixups that lead to a tweak of
iomap_iter_advance() semantics and folding in a couple more advances in
unshare and zero range that were missed previously.
I also briefly considered a new iomap_iter_advance_full() or some such
helper for cases that have no use for the length variable, but I'm
deferring that because switching back to an s64 return for
iomap_iter_advance() would probably eliminate the need for that.
Christoph,
I dropped the R-b tag for patch 3 because the code changed enough that
it might be worth a second look, but otherwise I don't think the logic
has really changed. With the error passthru removed I think the advance
call from iomap_iter() can ultimately go away when remaining ops are
switched over. This should be able to eventually just check for an error
return, a (non-stale) failure to advance, or otherwise proceed or not
based on iter->len.
Thoughts, reviews, flames appreciated.
Brian
v3:
- Code style and comment fixups.
- Variable type fixups and rework of iomap_iter_advance() to return
error/length separately.
- Advance the iter on unshare and zero range skip cases instead of
returning length.
v2: https://lore.kernel.org/linux-fsdevel/20250122133434.535192-1-bfoster@redhat.com/
- More refactoring of iomap_iter[_advance]() logic. Lifted out iter
continuation and stale logic and improved comments.
- Renamed some poorly named helpers and variables.
- Return remaining length for current iter from _iter_advance() and use
appropriately.
v1: https://lore.kernel.org/linux-fsdevel/20241213143610.1002526-1-bfoster@redhat.com/
- Reworked and fixed a bunch of functional issues.
RFC: https://lore.kernel.org/linux-fsdevel/20241125140623.20633-1-bfoster@redhat.com/
Brian Foster (7):
iomap: split out iomap check and reset logic from iter advance
iomap: factor out iomap length helper
iomap: refactor iter and advance continuation logic
iomap: support incremental iomap_iter advances
iomap: advance the iter directly on buffered writes
iomap: advance the iter directly on unshare range
iomap: advance the iter directly on zero range
fs/iomap/buffered-io.c | 67 +++++++++++++--------------
fs/iomap/iter.c | 103 ++++++++++++++++++++++++++---------------
include/linux/iomap.h | 27 +++++++++--
3 files changed, 120 insertions(+), 77 deletions(-)
--
2.47.1
next reply other threads:[~2025-01-30 17:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 17:09 Brian Foster [this message]
2025-01-30 17:09 ` [PATCH v3 1/7] iomap: split out iomap check and reset logic from iter advance Brian Foster
2025-01-30 17:09 ` [PATCH v3 2/7] iomap: factor out iomap length helper Brian Foster
2025-01-30 17:09 ` [PATCH v3 3/7] iomap: refactor iter and advance continuation logic Brian Foster
2025-01-31 8:08 ` Christoph Hellwig
2025-01-31 12:50 ` Brian Foster
2025-01-30 17:09 ` [PATCH v3 4/7] iomap: support incremental iomap_iter advances Brian Foster
2025-01-30 17:09 ` [PATCH v3 5/7] iomap: advance the iter directly on buffered writes Brian Foster
2025-01-30 17:09 ` [PATCH v3 6/7] iomap: advance the iter directly on unshare range Brian Foster
2025-01-31 8:09 ` Christoph Hellwig
2025-01-30 17:09 ` [PATCH v3 7/7] iomap: advance the iter directly on zero range Brian Foster
2025-01-31 8:09 ` Christoph Hellwig
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=20250130170949.916098-1-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=hch@infradead.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