Skip to content

RFC iomap: zero range folio batch processing prototype

Brian Foster linux-fsdevel linux-xfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest4 patches 8 repliesIn review
  2. v1 RFC4 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iomap: prep work for folio_batch supportfs/iomap/buffered-io.c+57 -430 replies
2/4iomap: optional zero range dirty folio processingfs/iomap/buffered-io.c fs/iomap/iter.c include/linux/iomap.h+84 -36 replies
3/4xfs: always trim mapping to requested range for zero rangefs/xfs/xfs_iomap.c+8 -91 reply
4/4xfs: fill dirty folios on zero range of unwritten mappingsfs/xfs/xfs_iomap.c+10 -01 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchBrian FosterChristoph Hellwig
1/4Not-Signed-off-by
2/4
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH RFCv2 0/4] iomap: zero range folio batch processing prototype

Hi all,

This is an update of the folio_batch prototype for zero range. The idea here is first to provide a mechanism to correctly handle dirty folios over unwritten extents on zero range without needing to flush, and second to add it in a way such that it can be extended to other operations in the future. For example, seek data over unwritten extents could use similar treatment as zero range, and multiple people have brought up the idea of using this for buffered writes in the future.

The primary change in RFCv2 is this is now ported on top of the incremental iter advance patches, which eliminates the need for patch 1 in RFCv1 and allows plumbing into the normal folio get path.

This is still a WIP and I'm posting mainly as a reference for the incremental advance patches. Patch 1 is a squash of 7 or 8 prep patches that aren't all that interesting, patch 2 implements batch support, patch 3 is a prep patch for XFS, and patch 4 updates XFS to use the iter batch on zero range.

Thoughts, reviews, flames appreciated.

Brian

RFCv2:
- Port onto incremental advance, drop patch 1 from RFCv1.
- Moved batch into iomap_iter, dynamically allocate and drop flag.
- Tweak XFS patch to always trim zero range on EOF boundary.
RFCv1: https://lore.kernel.org/linux-fsdevel/[email protected]/

Brian Foster (4):
iomap: prep work for folio_batch support
iomap: optional zero range dirty folio processing
xfs: always trim mapping to requested range for zero range
xfs: fill dirty folios on zero range of unwritten mappings

 fs/iomap/buffered-io.c | 177 ++++++++++++++++++++++++++++++-----------
 fs/iomap/iter.c        |   6 ++
 fs/xfs/xfs_iomap.c     |  25 ++++--
 include/linux/iomap.h  |   4 +
 4 files changed, 158 insertions(+), 54 deletions(-)
Signature · 1 line
2.47.0