[RFC PATCH v2 0/8] fat: convert to iomap
From: Matheus Alves de Almeida
Date: Tue Nov 17 2026 - 21:02:20 EST
Hi,
This series converts fat to use iomap. It follows roughly the direction
suggested by https://docs.kernel.org/filesystems/iomap/porting.html,
with the exfat conversion series and related fixes as a reference.
Overall, the largest performance improvements were seen for extending
writes (~60%) and fallocate() (~30%).
Changes in v2:
- Rebase against latest linux-next.
- Rework DIO, using direct_write_fallback() instead of a fat-specific DIO
fallback function.
- Check for errors/short write before truncating on buffered writes.
- Clean bdev aliases after unlocking fat.
- Rework how fat_zero_and_extend() gets and zeroes its folios.
- Rework cluster cache range lookups.
- Return IOMAP_HOLE past EOF unless writing or reporting.
- Drop i_rwsem from buffered reads.
- Use iomap_folio_mark_uptodate() when zeroing folios past EOF in
fat_zero_and_extend().
- Don't roll back allocations on ENOSPC in fat_cont_expand() and
fat_iomap_begin_write().
Thanks,
Matheus
Matheus Alves de Almeida (8):
fat: support FIEMAP
fat: use iomap for ->bmap()
fat: add iomap direct I/O support
fat: clean stale bdev buffers of newly allocated clusters
fat: drop ->write_begin() and ->write_end() usage from
fat_cont_expand()
fat: add iomap buffered I/O support
fat: remove ->mmu_private
fat: add multi-cluster allocation for write
fs/fat/Kconfig | 2 +-
fs/fat/Makefile | 2 +-
fs/fat/cache.c | 100 +++++++++++-----
fs/fat/dir.c | 1 -
fs/fat/fat.h | 20 ++--
fs/fat/fatent.c | 67 ++++++++---
fs/fat/file.c | 304 ++++++++++++++++++++++++++++++++++++++----------
fs/fat/inode.c | 248 +++++----------------------------------
fs/fat/iomap.c | 175 ++++++++++++++++++++++++++++
9 files changed, 591 insertions(+), 328 deletions(-)
create mode 100644 fs/fat/iomap.c
--
2.43.0