mbox series

[v2,00/12] iomap: incremental advance conversion -- phase 2

Message ID 20250219175050.83986-1-bfoster@redhat.com (mailing list archive)
Headers show
Series iomap: incremental advance conversion -- phase 2 | expand

Message

Brian Foster Feb. 19, 2025, 5:50 p.m. UTC
Hi all,

Here's phase 2 of the incremental iter advance conversions. This updates
all remaining iomap operations to advance the iter within the operation
and thus removes the need to advance from the core iomap iterator. Once
all operations are switched over, the core advance code is removed and
the processed field is renamed to reflect that it is now a pure status
code.

For context, this was first introduced in a previous series [1] that
focused mainly on the core mechanism and iomap buffered write. This is
because original impetus was to facilitate a folio batch mechanism where
a filesystem can optionally provide a batch of folios to process for a
given mapping (i.e. zero range of an unwritten mapping with dirty folios
in pagecache). That is still WIP, but the broader point is that this was
originally intended as an optional mode until consensus that fell out of
discussion was that it would be preferable to convert over everything.
This presumably facilitates some other future work and simplifies
semantics in the core iteration code.

Patches 1-3 convert over iomap buffered read, direct I/O and various
other remaining ops (swap, etc.). Patches 4-9 convert over the various
DAX iomap operations. Finally, patches 10-12 introduce some cleanups now
that all iomap operations have updated iteration semantics.

Thoughts, reviews, flames appreciated.

Brian

[1] https://lore.kernel.org/linux-fsdevel/20250207143253.314068-1-bfoster@redhat.com/

v2:
- Push dax_iomap_iter() advance changes down into type specific helpers
  (new patch).
- Added patch for iomap_iter_advance_full() helper.
- Various minor cleanups.
v1: https://lore.kernel.org/linux-fsdevel/20250212135712.506987-1-bfoster@redhat.com/

Brian Foster (12):
  iomap: advance the iter directly on buffered read
  iomap: advance the iter on direct I/O
  iomap: convert misc simple ops to incremental advance
  dax: advance the iomap_iter in the read/write path
  dax: push advance down into dax_iomap_iter() for read and write
  dax: advance the iomap_iter on zero range
  dax: advance the iomap_iter on unshare range
  dax: advance the iomap_iter on dedupe range
  dax: advance the iomap_iter on pte and pmd faults
  iomap: remove unnecessary advance from iomap_iter()
  iomap: rename iomap_iter processed field to status
  iomap: introduce a full map advance helper

 fs/dax.c               | 111 ++++++++++++++++++++++-------------------
 fs/iomap/buffered-io.c |  80 ++++++++++++++---------------
 fs/iomap/direct-io.c   |  24 ++++-----
 fs/iomap/fiemap.c      |  21 ++++----
 fs/iomap/iter.c        |  43 +++++++---------
 fs/iomap/seek.c        |  16 +++---
 fs/iomap/swapfile.c    |   7 +--
 fs/iomap/trace.h       |   8 +--
 include/linux/iomap.h  |  16 ++++--
 9 files changed, 163 insertions(+), 163 deletions(-)

Comments

Christian Brauner Feb. 20, 2025, 9:10 a.m. UTC | #1
On Wed, Feb 19, 2025 at 12:50:38PM -0500, Brian Foster wrote:
> Hi all,
> 
> Here's phase 2 of the incremental iter advance conversions. This updates

Hm, what's this based on? Can you base it on vfs-6.15.iomap, please?
Brian Foster Feb. 20, 2025, 2:59 p.m. UTC | #2
On Thu, Feb 20, 2025 at 10:10:41AM +0100, Christian Brauner wrote:
> On Wed, Feb 19, 2025 at 12:50:38PM -0500, Brian Foster wrote:
> > Hi all,
> > 
> > Here's phase 2 of the incremental iter advance conversions. This updates
> 
> Hm, what's this based on? Can you base it on vfs-6.15.iomap, please?
> 

Yup.. this was based on -rc3 plus the previous series that introduced
the core iomap change. I'll give hch a couple days or so for any further
comments and post a v3 with Darrick's nit fixed and rebased on the 6.15
iomap branch. Thanks!

Brian