public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] iomap: incremental per-operation iter advance
@ 2025-01-30 17:09 Brian Foster
  2025-01-30 17:09 ` [PATCH v3 1/7] iomap: split out iomap check and reset logic from " Brian Foster
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Brian Foster @ 2025-01-30 17:09 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-xfs, Christoph Hellwig

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


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

end of thread, other threads:[~2025-01-31 12:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-30 17:09 [PATCH v3 0/7] iomap: incremental per-operation iter advance Brian Foster
2025-01-30 17:09 ` [PATCH v3 1/7] iomap: split out iomap check and reset logic from " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox