diff options
| author | Brian Foster <bfoster@redhat.com> | 2025-10-03 09:46:37 -0400 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-11-05 12:57:24 +0100 |
| commit | 395ed1ef0012e1bb1e4050e84ba0173b3623112a (patch) | |
| tree | 9eedb8c78a114b6b84727713eea5dec259bf22f9 /scripts/lib | |
| parent | 49590716be886cc3cbbac10964eac551cfe570b2 (diff) | |
iomap: optional zero range dirty folio processing
The only way zero range can currently process unwritten mappings
with dirty pagecache is to check whether the range is dirty before
mapping lookup and then flush when at least one underlying mapping
is unwritten. This ordering is required to prevent iomap lookup from
racing with folio writeback and reclaim.
Since zero range can skip ranges of unwritten mappings that are
clean in cache, this operation can be improved by allowing the
filesystem to provide a set of dirty folios that require zeroing. In
turn, rather than flush or iterate file offsets, zero range can
iterate on folios in the batch and advance over clean or uncached
ranges in between.
Add a folio_batch in struct iomap and provide a helper for
filesystems to populate the batch at lookup time. Update the folio
lookup path to return the next folio in the batch, if provided, and
advance the iter if the folio starts beyond the current offset.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions
