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

Hi all,

Here's v2 of the iomap incremental iter advance series. This is mostly
the same idea as v1 with some of the cleanups noted below. The most
significant change is probably a bit more rework of the logic between
iomap_iter_advance() and iomap_iter() to make the former a bit more
generic. _advance() now returns the remaining length for the current
mapping for easier use in some of the iter handlers.

The other item of note for v1 was some discussion with Christoph over
changing over more of the operations to advance directly and avoid the
need to handle both types of advances in the iomap_iter() code. I don't
plan to address that in this series, but I've read through some of the
related code and think that perhaps this isn't as invasive as I
originally anticipated. Reason being that even some of the more complex
operations (i.e. direct I/O, buffered read) don't necessarily require
plumbing advances all the way down through the sub-helpers and whatnot
to eliminate the dependency from iomap_iter(). IOW, I think toplevel
direct I/O could just change to something like so:

	iter.processed = iomap_dio_iter(...);
	if (iter.processed > 0) {
		iomap_iter_advance(..., processed);
		iter.processed = 0;	/* success */
	}

... to translate the op-specific code into the updated iteration
semantics. Given that, I'll probably make a quick stab at that once this
series is settled and we'll see how that pans out.

Thoughts, reviews, flames appreciated.

Brian

v2:
- 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 | 50 ++++++++-------------
 fs/iomap/iter.c        | 99 ++++++++++++++++++++++++++----------------
 include/linux/iomap.h  | 20 ++++++---
 3 files changed, 94 insertions(+), 75 deletions(-)

-- 
2.47.1


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

end of thread, other threads:[~2025-01-29 16:38 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22 13:34 [PATCH v2 0/7] iomap: incremental per-operation iter advance Brian Foster
2025-01-22 13:34 ` [PATCH v2 1/7] iomap: split out iomap check and reset logic from " Brian Foster
2025-01-22 13:34 ` [PATCH v2 2/7] iomap: factor out iomap length helper Brian Foster
2025-01-28  5:26   ` Christoph Hellwig
2025-01-28 13:53     ` Brian Foster
2025-01-22 13:34 ` [PATCH v2 3/7] iomap: refactor iter and advance continuation logic Brian Foster
2025-01-28  5:34   ` Christoph Hellwig
2025-01-28 13:55     ` Brian Foster
2025-01-29  5:50       ` Christoph Hellwig
2025-01-22 13:34 ` [PATCH v2 4/7] iomap: support incremental iomap_iter advances Brian Foster
2025-01-28  5:35   ` Christoph Hellwig
2025-01-22 13:34 ` [PATCH v2 5/7] iomap: advance the iter directly on buffered writes Brian Foster
2025-01-28  5:36   ` Christoph Hellwig
2025-01-22 13:34 ` [PATCH v2 6/7] iomap: advance the iter directly on unshare range Brian Foster
2025-01-28  5:39   ` Christoph Hellwig
2025-01-28 13:57     ` Brian Foster
2025-01-29  5:58       ` Christoph Hellwig
2025-01-28 17:59     ` Brian Foster
2025-01-29  5:56       ` Christoph Hellwig
2025-01-29 16:40         ` Brian Foster
2025-01-22 13:34 ` [PATCH v2 7/7] iomap: advance the iter directly on zero range Brian Foster
2025-01-28  5:40   ` Christoph Hellwig

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