mbox series

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

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

Message

Brian Foster Feb. 24, 2025, 2:47 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/

v3:
- Fixed whitespace in iomap_iter_advance_full().
- Rebased onto vfs-6.15.iomap.
v2: https://lore.kernel.org/linux-fsdevel/20250219175050.83986-1-bfoster@redhat.com/
- 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  |  17 +++++--
 9 files changed, 164 insertions(+), 163 deletions(-)

Comments

Christian Brauner Feb. 26, 2025, 8:43 a.m. UTC | #1
On Mon, 24 Feb 2025 09:47:45 -0500, Brian Foster wrote:
> 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.
> 
> [...]

I think review has concluded so let's get this into -next.

---

Applied to the vfs-6.15.iomap branch of the vfs/vfs.git tree.
Patches in the vfs-6.15.iomap branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.15.iomap

[01/12] iomap: advance the iter directly on buffered read
        https://git.kernel.org/vfs/vfs/c/d9dc477ff6a2
[02/12] iomap: advance the iter on direct I/O
        https://git.kernel.org/vfs/vfs/c/8fecec46d10b
[03/12] iomap: convert misc simple ops to incremental advance
        https://git.kernel.org/vfs/vfs/c/f145377da150
[04/12] dax: advance the iomap_iter in the read/write path
        https://git.kernel.org/vfs/vfs/c/e1e6bae60732
[05/12] dax: push advance down into dax_iomap_iter() for read and write
        https://git.kernel.org/vfs/vfs/c/e1dae77b50e3
[06/12] dax: advance the iomap_iter on zero range
        https://git.kernel.org/vfs/vfs/c/80fce3058407
[07/12] dax: advance the iomap_iter on unshare range
        https://git.kernel.org/vfs/vfs/c/9ba439cbdcf2
[08/12] dax: advance the iomap_iter on dedupe range
        https://git.kernel.org/vfs/vfs/c/39eb05112987
[09/12] dax: advance the iomap_iter on pte and pmd faults
        https://git.kernel.org/vfs/vfs/c/6fe32fe1bbc1
[10/12] iomap: remove unnecessary advance from iomap_iter()
        https://git.kernel.org/vfs/vfs/c/469739f1d8c5
[11/12] iomap: rename iomap_iter processed field to status
        https://git.kernel.org/vfs/vfs/c/edd3e3b7d210
[12/12] iomap: introduce a full map advance helper
        https://git.kernel.org/vfs/vfs/c/d79c9cc51297