linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iomap: flush dirty cache over unwritten mappings on zero range
@ 2024-08-22 14:59 Brian Foster
  2024-08-22 14:59 ` [PATCH 1/2] iomap: fix handling of dirty folios over unwritten extents Brian Foster
  2024-08-22 14:59 ` [PATCH 2/2] iomap: make zero range flush conditional on unwritten mappings Brian Foster
  0 siblings, 2 replies; 12+ messages in thread
From: Brian Foster @ 2024-08-22 14:59 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-xfs, djwong, josef, david

Hi all,

This is the alternative flushing solution to the iomap zero range
problem with dirty pagecache over unwritten mappings. This is done in
two steps. Patch 1 lifts the XFS workaround into iomap, flushing the
range unconditionally and providing an easily backportable fix for
stable kernels. Patch 2 buries the flush further down into iomap, making
it conditional on the combined presence of dirty cache and unwritten
mappings in the target range. This may be reasonable backportable as
well, but is only required if performance is a concern.

I still have to look into the improved revalidation approach discussed
in the RFC thread, but given that requires validation support and this
is intended to be a generic fallback, I wanted to get this nailed down
first.

fstests coverage for this problem is posted here [1]. Thoughts, reviews,
flames appreciated.

Brian

v1:
- Alternative approach, flush instead of revalidate.
rfc: https://lore.kernel.org/linux-fsdevel/20240718130212.23905-1-bfoster@redhat.com/

[1] https://lore.kernel.org/fstests/20240822144422.188462-1-bfoster@redhat.com/

Brian Foster (2):
  iomap: fix handling of dirty folios over unwritten extents
  iomap: make zero range flush conditional on unwritten mappings

 fs/iomap/buffered-io.c | 52 ++++++++++++++++++++++++++++++++++++++----
 fs/xfs/xfs_iops.c      | 10 --------
 2 files changed, 48 insertions(+), 14 deletions(-)

-- 
2.45.0


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

end of thread, other threads:[~2024-08-30 23:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22 14:59 [PATCH 0/2] iomap: flush dirty cache over unwritten mappings on zero range Brian Foster
2024-08-22 14:59 ` [PATCH 1/2] iomap: fix handling of dirty folios over unwritten extents Brian Foster
2024-08-22 14:59 ` [PATCH 2/2] iomap: make zero range flush conditional on unwritten mappings Brian Foster
2024-08-27  6:11   ` Christoph Hellwig
2024-08-27 14:23     ` Brian Foster
2024-08-28  4:32       ` Christoph Hellwig
2024-08-28 12:35         ` Brian Foster
2024-08-29  5:41           ` Christoph Hellwig
2024-08-29 15:05             ` Brian Foster
2024-08-29 21:48               ` Darrick J. Wong
2024-08-30 11:57                 ` Brian Foster
2024-08-30 23:02                   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).