[v7,00/11] ext4: port direct I/O to iomap infrastructure
mbox series

Message ID cover.1572949325.git.mbobrowski@mbobrowski.org
Headers show
Series
  • ext4: port direct I/O to iomap infrastructure
Related show

Message

Matthew Bobrowski Nov. 5, 2019, 11:58 a.m. UTC
Hi all,

This is an updated patch series of the ext4 direct I/O port to iomap
infrastructure. This updated series includes some minor updates and
fixes that were identified within the preceding patch
series. Changlog since v6 has been summarised below:

Changes since v6:

 - Removed duplicate map->m_flags check in ext4_set_iomap(), which
   cleaned up some of unnecessary levels of identation.

 - Fixed an issue with the buffered I/O fallback path within
   ext4_dio_write_iter(). Previously, we only returned the value that
   ext4_buffered_write_iter() would return without taking into account
   anything that possibly written for the direct I/O. This meant that
   we'd return incorrect values back to userspace. 

 - Added missing fsync + page cache invalidation for written I/O range
   post buffered I/O fallback. This was missing from my original patch
   series, but this is actually needed in order to preserve direct I/O
   semantics.

The original cover letter for this series has been provided below for
reference.

---

This patch series ports the ext4 direct IO paths to make use of the
iomap infrastructure. The legacy buffer_head based direct IO paths
have subsequently been removed as they're now no longer in use. The
result of this change is that the direct IO implementation is much   
cleaner and keeps the code isolated from the buffer_head internals. In
addition to this, a slight performance boost could be expected while 
using O_SYNC | O_DIRECT IO.

The changes have been tested using xfstests in both DAX and non-DAX
modes using various filesystem configurations i.e. 4k, dioread_nolock,
nojournal, ext3.

Matthew Bobrowski (11):
  ext4: reorder map.m_flags checks within ext4_iomap_begin()
  ext4: update direct I/O read lock pattern for IOCB_NOWAIT
  ext4: iomap that extends beyond EOF should be marked dirty
  ext4: move set iomap routines into a separate helper ext4_set_iomap()
  ext4: split IOMAP_WRITE branch in ext4_iomap_begin() into helper
  ext4: introduce new callback for IOMAP_REPORT
  ext4: introduce direct I/O read using iomap infrastructure
  ext4: move inode extension/truncate code out from ->iomap_end()
    callback
  ext4: move inode extension check out from ext4_iomap_alloc()
  ext4: update ext4_sync_file() to not use __generic_file_fsync()
  ext4: introduce direct I/O write using iomap infrastructure

 fs/ext4/ext4.h    |   4 +-
 fs/ext4/extents.c |  11 +-
 fs/ext4/file.c    | 412 +++++++++++++++++++++-----
 fs/ext4/fsync.c   |  72 +++--
 fs/ext4/inode.c   | 720 +++++++++++-----------------------------------
 5 files changed, 563 insertions(+), 656 deletions(-)