fs/exfat/Kconfig | 2 +- fs/exfat/Makefile | 2 +- fs/exfat/balloc.c | 2 +- fs/exfat/dir.c | 50 +++--- fs/exfat/exfat_fs.h | 140 ++++++++++++----- fs/exfat/fatent.c | 30 ++-- fs/exfat/file.c | 263 +++++++++++++++++++++++-------- fs/exfat/inode.c | 342 ++++++----------------------------------- fs/exfat/iomap.c | 263 +++++++++++++++++++++++++++++++ fs/exfat/iomap.h | 15 ++ fs/exfat/namei.c | 28 ++-- fs/exfat/super.c | 5 +- fs/iomap/buffered-io.c | 4 + include/linux/iomap.h | 4 + 14 files changed, 703 insertions(+), 447 deletions(-) create mode 100644 fs/exfat/iomap.c create mode 100644 fs/exfat/iomap.h
This patch series converts the exfat filesystem to the iomap framework for
buffered I/O, direct I/O, and llseek (SEEK_HOLE/SEEK_DATA) support.
iozone benchmark results (4KB cluster size, -s1g -r64k, 1GB file, 64KB record size)
1 thread 4 threads
Write Read Write Read
(MB/s) (MB/s) (MB/s) (MB/s)
-----------------------------------------------------------------
exfat + iomap patch 332.7 418.1 78.6 82.4
Current exfat 278.4 415.1 42.1 38.0
-----------------------------------------------------------------
Improvement +19.5% +0.7% +86.7% +117.4%
Available in the Git repository at:
===================================
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git iomap-work
v4:
- Declare initialized variables before uninitialized ones in
__iomap_write_begin.
- Clean up the logic for handling ei->valid_size in the non-alloc
iomap read path.
- Rename exfat_cluster_to_phys to exfat_cluster_to_phys_bytes.
- Use end variable in exfat_fallback_buffered_write.
v3:
- Remove extra >> 9 when adding to inode->i_blocks.
- Simplify exfat_file_open() by removing unnecessary err variable.
- Separate exfat_truncate() error return conversion from iomap changes.
- Fix xfstests failures with 512B cluster size.
- Make exfat_truncate() return error code.
- Use inode lock to protect valid_size in exfat_extend_valid_size().
- Unify num_clusters calculation regardless of may_alloc.
- Use min_t() to clamp iomap->length.
- Return early in exfat_write_iomap_end() if no data written.
- Remove s_lock in exfat_write_iomap_end().
- Split DIO fallback buffered write into helper function.
- Remove unnecessary goto in exfat_dio_write_iter().
v2:
- Replace macros with static inline functions.
- Remove noop_direct_IO.
- Consolidate read and write iomap_begin into __exfat_iomap_begin()
- Zero out stale data in straddle block beyond valid_size.
- Introduce IOMAP_F_ZERO_TAIL flag to remove exfat_iomap_put_folio().
- Select FS_IOMAP in Kconfig.
- Remove unnecessary alignment check in exfat_file_read_iter().
- Just use generic_file_llseek directly.
- Move exfat_extend_valid_size to exfat_file_write_iter().
- Use pagecache_isize_extended() to remove iomap_zero_range in
exfat_setattr().
- fix mmap write data corruption with byte-by-byte fallocate.
- Remove exfat_mkwrite_iomap_begin().
Namjae Jeon (11):
iomap: introduce IOMAP_F_ZERO_TAIL flag
exfat: replace unsafe macros with static inline functions
exfat: add balloc parameter to exfat_map_cluster() for iomap support
exfat: add exfat_file_open()
exfat: add support for multi-cluster allocation
exfat: add data_start_bytes and exfat_cluster_to_phys_bytes() helper
exfat: fix implicit declaration of brelse()
exfat: add iomap buffered I/O support
exfat: add iomap direct I/O support
exfat: add support for SEEK_HOLE and SEEK_DATA in llseek
exfat: make exfat_truncate() return error code
fs/exfat/Kconfig | 2 +-
fs/exfat/Makefile | 2 +-
fs/exfat/balloc.c | 2 +-
fs/exfat/dir.c | 50 +++---
fs/exfat/exfat_fs.h | 140 ++++++++++++-----
fs/exfat/fatent.c | 30 ++--
fs/exfat/file.c | 263 +++++++++++++++++++++++--------
fs/exfat/inode.c | 342 ++++++-----------------------------------
fs/exfat/iomap.c | 263 +++++++++++++++++++++++++++++++
fs/exfat/iomap.h | 15 ++
fs/exfat/namei.c | 28 ++--
fs/exfat/super.c | 5 +-
fs/iomap/buffered-io.c | 4 +
include/linux/iomap.h | 4 +
14 files changed, 703 insertions(+), 447 deletions(-)
create mode 100644 fs/exfat/iomap.c
create mode 100644 fs/exfat/iomap.h
--
2.25.1
So with all the reviews in we need to figure out how to merge this. Does merging the iomap part through the vfs tree and pulling that into the exfat tree work for you? On Mon, May 18, 2026 at 08:46:54PM +0900, Namjae Jeon wrote: > This patch series converts the exfat filesystem to the iomap framework for > buffered I/O, direct I/O, and llseek (SEEK_HOLE/SEEK_DATA) support. > > iozone benchmark results (4KB cluster size, -s1g -r64k, 1GB file, 64KB record size) > > 1 thread 4 threads > Write Read Write Read > (MB/s) (MB/s) (MB/s) (MB/s) > ----------------------------------------------------------------- > exfat + iomap patch 332.7 418.1 78.6 82.4 > Current exfat 278.4 415.1 42.1 38.0 > ----------------------------------------------------------------- > Improvement +19.5% +0.7% +86.7% +117.4% > > > Available in the Git repository at: > =================================== > git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git iomap-work > > v4: > - Declare initialized variables before uninitialized ones in > __iomap_write_begin. > - Clean up the logic for handling ei->valid_size in the non-alloc > iomap read path. > - Rename exfat_cluster_to_phys to exfat_cluster_to_phys_bytes. > - Use end variable in exfat_fallback_buffered_write. > > v3: > - Remove extra >> 9 when adding to inode->i_blocks. > - Simplify exfat_file_open() by removing unnecessary err variable. > - Separate exfat_truncate() error return conversion from iomap changes. > - Fix xfstests failures with 512B cluster size. > - Make exfat_truncate() return error code. > - Use inode lock to protect valid_size in exfat_extend_valid_size(). > - Unify num_clusters calculation regardless of may_alloc. > - Use min_t() to clamp iomap->length. > - Return early in exfat_write_iomap_end() if no data written. > - Remove s_lock in exfat_write_iomap_end(). > - Split DIO fallback buffered write into helper function. > - Remove unnecessary goto in exfat_dio_write_iter(). > > v2: > - Replace macros with static inline functions. > - Remove noop_direct_IO. > - Consolidate read and write iomap_begin into __exfat_iomap_begin() > - Zero out stale data in straddle block beyond valid_size. > - Introduce IOMAP_F_ZERO_TAIL flag to remove exfat_iomap_put_folio(). > - Select FS_IOMAP in Kconfig. > - Remove unnecessary alignment check in exfat_file_read_iter(). > - Just use generic_file_llseek directly. > - Move exfat_extend_valid_size to exfat_file_write_iter(). > - Use pagecache_isize_extended() to remove iomap_zero_range in > exfat_setattr(). > - fix mmap write data corruption with byte-by-byte fallocate. > - Remove exfat_mkwrite_iomap_begin(). > > Namjae Jeon (11): > iomap: introduce IOMAP_F_ZERO_TAIL flag > exfat: replace unsafe macros with static inline functions > exfat: add balloc parameter to exfat_map_cluster() for iomap support > exfat: add exfat_file_open() > exfat: add support for multi-cluster allocation > exfat: add data_start_bytes and exfat_cluster_to_phys_bytes() helper > exfat: fix implicit declaration of brelse() > exfat: add iomap buffered I/O support > exfat: add iomap direct I/O support > exfat: add support for SEEK_HOLE and SEEK_DATA in llseek > exfat: make exfat_truncate() return error code > > fs/exfat/Kconfig | 2 +- > fs/exfat/Makefile | 2 +- > fs/exfat/balloc.c | 2 +- > fs/exfat/dir.c | 50 +++--- > fs/exfat/exfat_fs.h | 140 ++++++++++++----- > fs/exfat/fatent.c | 30 ++-- > fs/exfat/file.c | 263 +++++++++++++++++++++++-------- > fs/exfat/inode.c | 342 ++++++----------------------------------- > fs/exfat/iomap.c | 263 +++++++++++++++++++++++++++++++ > fs/exfat/iomap.h | 15 ++ > fs/exfat/namei.c | 28 ++-- > fs/exfat/super.c | 5 +- > fs/iomap/buffered-io.c | 4 + > include/linux/iomap.h | 4 + > 14 files changed, 703 insertions(+), 447 deletions(-) > create mode 100644 fs/exfat/iomap.c > create mode 100644 fs/exfat/iomap.h > > -- > 2.25.1 ---end quoted text---
On Tue, May 19, 2026 at 4:05 PM Christoph Hellwig <hch@lst.de> wrote: > > So with all the reviews in we need to figure out how to merge > this. Does merging the iomap part through the vfs tree and > pulling that into the exfat tree work for you? Yes. If Christian can take the 0001 iomap patch through the vfs tree, I will apply the remaining exfat patches to the exfat tree after pulling it in. Thanks!
On Mon, May 18, 2026 at 08:46:54PM +0900, Namjae Jeon wrote: > This patch series converts the exfat filesystem to the iomap framework for > buffered I/O, direct I/O, and llseek (SEEK_HOLE/SEEK_DATA) support. > > iozone benchmark results (4KB cluster size, -s1g -r64k, 1GB file, 64KB record size) > > 1 thread 4 threads > Write Read Write Read > (MB/s) (MB/s) (MB/s) (MB/s) > ----------------------------------------------------------------- > exfat + iomap patch 332.7 418.1 78.6 82.4 > Current exfat 278.4 415.1 42.1 38.0 > ----------------------------------------------------------------- > Improvement +19.5% +0.7% +86.7% +117.4% FWIW I scanned over the other patches in the series. Nothing stood out as scream-worthy, though as the maintainer I'm assuming you're watching them closely for the kinds of QA problems that only an exfat expert would know. ;) Acked-by: "Darrick J. Wong" <djwong@kernel.org> --D > > Available in the Git repository at: > =================================== > git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git iomap-work > > v4: > - Declare initialized variables before uninitialized ones in > __iomap_write_begin. > - Clean up the logic for handling ei->valid_size in the non-alloc > iomap read path. > - Rename exfat_cluster_to_phys to exfat_cluster_to_phys_bytes. > - Use end variable in exfat_fallback_buffered_write. > > v3: > - Remove extra >> 9 when adding to inode->i_blocks. > - Simplify exfat_file_open() by removing unnecessary err variable. > - Separate exfat_truncate() error return conversion from iomap changes. > - Fix xfstests failures with 512B cluster size. > - Make exfat_truncate() return error code. > - Use inode lock to protect valid_size in exfat_extend_valid_size(). > - Unify num_clusters calculation regardless of may_alloc. > - Use min_t() to clamp iomap->length. > - Return early in exfat_write_iomap_end() if no data written. > - Remove s_lock in exfat_write_iomap_end(). > - Split DIO fallback buffered write into helper function. > - Remove unnecessary goto in exfat_dio_write_iter(). > > v2: > - Replace macros with static inline functions. > - Remove noop_direct_IO. > - Consolidate read and write iomap_begin into __exfat_iomap_begin() > - Zero out stale data in straddle block beyond valid_size. > - Introduce IOMAP_F_ZERO_TAIL flag to remove exfat_iomap_put_folio(). > - Select FS_IOMAP in Kconfig. > - Remove unnecessary alignment check in exfat_file_read_iter(). > - Just use generic_file_llseek directly. > - Move exfat_extend_valid_size to exfat_file_write_iter(). > - Use pagecache_isize_extended() to remove iomap_zero_range in > exfat_setattr(). > - fix mmap write data corruption with byte-by-byte fallocate. > - Remove exfat_mkwrite_iomap_begin(). > > Namjae Jeon (11): > iomap: introduce IOMAP_F_ZERO_TAIL flag > exfat: replace unsafe macros with static inline functions > exfat: add balloc parameter to exfat_map_cluster() for iomap support > exfat: add exfat_file_open() > exfat: add support for multi-cluster allocation > exfat: add data_start_bytes and exfat_cluster_to_phys_bytes() helper > exfat: fix implicit declaration of brelse() > exfat: add iomap buffered I/O support > exfat: add iomap direct I/O support > exfat: add support for SEEK_HOLE and SEEK_DATA in llseek > exfat: make exfat_truncate() return error code > > fs/exfat/Kconfig | 2 +- > fs/exfat/Makefile | 2 +- > fs/exfat/balloc.c | 2 +- > fs/exfat/dir.c | 50 +++--- > fs/exfat/exfat_fs.h | 140 ++++++++++++----- > fs/exfat/fatent.c | 30 ++-- > fs/exfat/file.c | 263 +++++++++++++++++++++++-------- > fs/exfat/inode.c | 342 ++++++----------------------------------- > fs/exfat/iomap.c | 263 +++++++++++++++++++++++++++++++ > fs/exfat/iomap.h | 15 ++ > fs/exfat/namei.c | 28 ++-- > fs/exfat/super.c | 5 +- > fs/iomap/buffered-io.c | 4 + > include/linux/iomap.h | 4 + > 14 files changed, 703 insertions(+), 447 deletions(-) > create mode 100644 fs/exfat/iomap.c > create mode 100644 fs/exfat/iomap.h > > -- > 2.25.1 > >
On Tue, May 19, 2026 at 12:40 PM Darrick J. Wong <djwong@kernel.org> wrote: > > On Mon, May 18, 2026 at 08:46:54PM +0900, Namjae Jeon wrote: > > This patch series converts the exfat filesystem to the iomap framework for > > buffered I/O, direct I/O, and llseek (SEEK_HOLE/SEEK_DATA) support. > > > > iozone benchmark results (4KB cluster size, -s1g -r64k, 1GB file, 64KB record size) > > > > 1 thread 4 threads > > Write Read Write Read > > (MB/s) (MB/s) (MB/s) (MB/s) > > ----------------------------------------------------------------- > > exfat + iomap patch 332.7 418.1 78.6 82.4 > > Current exfat 278.4 415.1 42.1 38.0 > > ----------------------------------------------------------------- > > Improvement +19.5% +0.7% +86.7% +117.4% > > FWIW I scanned over the other patches in the series. Nothing stood out > as scream-worthy, though as the maintainer I'm assuming you're watching > them closely for the kinds of QA problems that only an exfat expert > would know. ;) I've checked it against all the potential issues I'm aware of and no issues in my test-sets either. Once IOMAP_F_ZERO_TAIL lands, I plan to update NTFS to use it as well. > > Acked-by: "Darrick J. Wong" <djwong@kernel.org> Thanks for reviewing the series and giving your Acked-by!
On Mon, 18 May 2026 20:46:54 +0900, Namjae Jeon wrote:
> This patch series converts the exfat filesystem to the iomap framework for
> buffered I/O, direct I/O, and llseek (SEEK_HOLE/SEEK_DATA) support.
>
> iozone benchmark results (4KB cluster size, -s1g -r64k, 1GB file, 64KB record size)
>
> 1 thread 4 threads
> Write Read Write Read
> (MB/s) (MB/s) (MB/s) (MB/s)
> -----------------------------------------------------------------
> exfat + iomap patch 332.7 418.1 78.6 82.4
> Current exfat 278.4 415.1 42.1 38.0
> -----------------------------------------------------------------
> Improvement +19.5% +0.7% +86.7% +117.4%
>
> [...]
Applied to the vfs-7.2.iomap branch of the vfs/vfs.git tree.
Patches in the vfs-7.2.iomap branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.2.iomap
[01/11] iomap: introduce IOMAP_F_ZERO_TAIL flag
https://git.kernel.org/vfs/vfs/c/f356603d90eb
© 2016 - 2026 Red Hat, Inc.