[PATCH v2 0/9] exfat: convert to iomap

Namjae Jeon posted 9 patches 1 month ago
There is a newer version of this series
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        | 253 +++++++++++++++++++++++-------
fs/exfat/inode.c       | 342 ++++++-----------------------------------
fs/exfat/iomap.c       | 247 +++++++++++++++++++++++++++++
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, 678 insertions(+), 446 deletions(-)
create mode 100644 fs/exfat/iomap.c
create mode 100644 fs/exfat/iomap.h
[PATCH v2 0/9] exfat: convert to iomap
Posted by Namjae Jeon 1 month ago
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%


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 (9):
  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
  iomap: introduce IOMAP_F_ZERO_TAIL flag
  exfat: add data_start_bytes and exfat_cluster_to_phys() helper
  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

 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        | 253 +++++++++++++++++++++++-------
 fs/exfat/inode.c       | 342 ++++++-----------------------------------
 fs/exfat/iomap.c       | 247 +++++++++++++++++++++++++++++
 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, 678 insertions(+), 446 deletions(-)
 create mode 100644 fs/exfat/iomap.c
 create mode 100644 fs/exfat/iomap.h

-- 
2.25.1