fuse: use iomap for writeback
authorJoanne Koong <joannelkoong@gmail.com>
Tue, 15 Jul 2025 20:21:19 +0000 (13:21 -0700)
committerChristian Brauner <brauner@kernel.org>
Thu, 17 Jul 2025 07:55:18 +0000 (09:55 +0200)
commitef7e7cbb323f8a39381a2d4bb8392712bf3cf7ae
tree5f55afb3b9085ff8d8338f04d43cc8db4a88d7d4
parenta4c9ab1d4975746c14b34c7bb908869245a9dd4f
fuse: use iomap for writeback

Use iomap for dirty folio writeback in ->writepages().
This allows for granular dirty writeback of large folios.

Only the dirty portions of the large folio will be written instead of
having to write out the entire folio. For example if there is a 1 MB
large folio and only 2 bytes in it are dirty, only the page for those
dirty bytes will be written out.

.dirty_folio needs to be set to iomap_dirty_folio so that the bitmap
iomap uses for dirty tracking correctly reflects dirty regions that need
to be written back.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://lore.kernel.org/20250715202122.2282532-3-joannelkoong@gmail.com
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fuse/file.c