public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] iomap, xfs: improve zero range flushing and lookup
@ 2026-03-09 13:44 Brian Foster
  2026-03-09 13:44 ` [PATCH v3 1/8] xfs: fix iomap hole map reporting for zoned zero range Brian Foster
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Brian Foster @ 2026-03-09 13:44 UTC (permalink / raw)
  To: linux-fsdevel, linux-xfs

Hi all,

Here's v3 of the patches to lift and replace the hole mapping pagecache
flush logic from iomap into XFS and clean it up. The major changes from
v2 are the addition of patches 1, 2 and 8.

Christoph discovered a regression with zero range in zoned mode on v2 of
the series. The problem is that the zoned mode iomap_begin() relied on
the hole mapping flush to handle the case where writes are pending but
blocks have not yet been mapped into the data fork for the first time.
Patches 1-2 lift the flush into the begin handler, document the purpose,
and clean up the logic a bit. They are inserted at the beginning of the
series to avoid regression from removing the flush from iomap in patch
3, but ordering is not critical as zoned support is experimental.

Patch 8 changes the normal buffered write iomap_begin() handler to no
longer report a hole in the situation where we have dirty pagecache
backed by COW fork blocks and a data fork hole. Since the main
differentiator between representing this case as a hole or data mapping
is pagecache, the folio lookup provides a straightforward way to
distinguish between the two.

Otherwise v3 includes some miscellaneous updates to logic, comments,
whitespace, etc. based on feedback to v2.

Brian

v3:
- Inserted new patches 1-2 to fix up zoned mode zeroing.
- Appended patch 8 to correctly report COW mappings backed by data fork
  holes.
- Various minor fixups to logic, whitespace, comments.
v2: https://lore.kernel.org/linux-fsdevel/20260129155028.141110-1-bfoster@redhat.com/
- Patch 1 from v1 merged separately.
- Fixed up iomap_fill_dirty_folios() call in patch 5.
v1: https://lore.kernel.org/linux-fsdevel/20251016190303.53881-1-bfoster@redhat.com/

Brian Foster (8):
  xfs: fix iomap hole map reporting for zoned zero range
  xfs: flush dirty pagecache over hole in zoned mode zero range
  iomap, xfs: lift zero range hole mapping flush into xfs
  xfs: flush eof folio before insert range size update
  xfs: look up cow fork extent earlier for buffered iomap_begin
  xfs: only flush when COW fork blocks overlap data fork holes
  xfs: replace zero range flush with folio batch
  xfs: report cow mappings with dirty pagecache for iomap zero range

 fs/iomap/buffered-io.c |   6 +-
 fs/xfs/xfs_file.c      |  17 +++++
 fs/xfs/xfs_iomap.c     | 145 +++++++++++++++++++++++++++++++----------
 3 files changed, 129 insertions(+), 39 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-03-10 14:59 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 13:44 [PATCH v3 0/8] iomap, xfs: improve zero range flushing and lookup Brian Foster
2026-03-09 13:44 ` [PATCH v3 1/8] xfs: fix iomap hole map reporting for zoned zero range Brian Foster
2026-03-09 17:11   ` Darrick J. Wong
2026-03-09 18:18     ` Brian Foster
2026-03-10 14:47       ` Darrick J. Wong
2026-03-10  6:45   ` Christoph Hellwig
2026-03-09 13:45 ` [PATCH v3 2/8] xfs: flush dirty pagecache over hole in zoned mode " Brian Foster
2026-03-09 17:22   ` Darrick J. Wong
2026-03-09 18:19     ` Brian Foster
2026-03-10  6:47     ` Christoph Hellwig
2026-03-10 14:48       ` Darrick J. Wong
2026-03-10  6:45   ` Christoph Hellwig
2026-03-09 13:45 ` [PATCH v3 3/8] iomap, xfs: lift zero range hole mapping flush into xfs Brian Foster
2026-03-09 17:40   ` Darrick J. Wong
2026-03-10  6:47   ` Christoph Hellwig
2026-03-09 13:45 ` [PATCH v3 4/8] xfs: flush eof folio before insert range size update Brian Foster
2026-03-09 17:32   ` Darrick J. Wong
2026-03-09 18:24     ` Brian Foster
2026-03-09 13:45 ` [PATCH v3 5/8] xfs: look up cow fork extent earlier for buffered iomap_begin Brian Foster
2026-03-09 13:45 ` [PATCH v3 6/8] xfs: only flush when COW fork blocks overlap data fork holes Brian Foster
2026-03-09 17:47   ` Darrick J. Wong
2026-03-09 13:45 ` [PATCH v3 7/8] xfs: replace zero range flush with folio batch Brian Foster
2026-03-09 17:48   ` Darrick J. Wong
2026-03-09 13:45 ` [PATCH v3 8/8] xfs: report cow mappings with dirty pagecache for iomap zero range Brian Foster
2026-03-09 17:56   ` Darrick J. Wong
2026-03-09 18:31     ` Brian Foster
2026-03-09 18:38       ` Darrick J. Wong
2026-03-10  6:50     ` Christoph Hellwig
2026-03-10 14:52       ` Darrick J. Wong
2026-03-10 14:59         ` Christoph Hellwig
2026-03-10  6:49   ` Christoph Hellwig
2026-03-10  6:45 ` [PATCH v3 0/8] iomap, xfs: improve zero range flushing and lookup Christoph Hellwig

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