[PATCH v4 0/8] ext4: port direct I/O to iomap infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series ports the ext4 direct I/O paths over to the iomap
infrastructure. The legacy buffer_head based direct I/O paths have
subsequently been removed as they're no longer in use. The result of
this change is that ext4 now uses the newer iomap framework for direct
I/O operations, which results in an overall cleaner implementation and
keeps the code isolated from buffer_head internals. In addition to
this, a slight performance boost may be expected while using O_SYNC |
O_DIRECT I/O.

The changes within this patch series have been tested via xfstests in
both DAX and non-DAX modes using the various filesystem configuration
options i.e. 4k, dioread_nolock, etc.

Changes since v3:

 - Introduced a couple preparation patches around refactoring the ext4
   iomap code. This involved splitting chunks of the existing
   ->iomap_begin() callback into separate helpers.

 - Moved out the orphan handling code into a higher level caller. It
   used to be within ext4_iomap_begin(), but is now within
   ext4_dio_write_iter() and similarily ext4_dax_write_iter().

 - Renamed the helper function from ext4_dio_checks() to
   ext4_dio_supported(). Overall, it just reads better when using this
   helper throughout the code.

 - Cleaned up the ->end_io() handler. This was a result of refactoring
   ext4_handle_inode_extension() and allowing it to perform clean up
   routines for extension cases rather than calling
   ext4_handle_failed_inode_extension() explicitly.

 - Added a couple comments here and there to bits of logic that aren't
   immediately obvious.

 - Rather than having the clean up code in a separate patch at the end
   of the series, I've incorporated the clean up into the patches
   directly.

Thank you to all that took the time to review the patch series and
provide very valuable feedback. This includes Jan Kara, Christoph
Hellwig, Ritesh Harjani, and anybody else that I may have missed.

Matthew Bobrowski (8):
  ext4: move out iomap field population into separate helper
  ext4: move out IOMAP_WRITE path into separate helper
  ext4: introduce new callback for IOMAP_REPORT operations
  ext4: introduce direct I/O read path using iomap infrastructure
  ext4: move inode extension/truncate code out from ->iomap_end()
    callback
  ext4: move inode extension checks out from ext4_iomap_alloc()
  ext4: reorder map.m_flags checks in ext4_set_iomap()
  ext4: introduce direct I/O write path using iomap infrastructure

 fs/ext4/ext4.h    |   4 +-
 fs/ext4/extents.c |  11 +-
 fs/ext4/file.c    | 387 ++++++++++++++++++++-----
 fs/ext4/inode.c   | 709 +++++++++++-----------------------------------
 4 files changed, 484 insertions(+), 627 deletions(-)

-- 
2.20.1




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux