lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 3 Oct 2019 21:32:48 +1000
From:   Matthew Bobrowski <mbobrowski@...browski.org>
To:     tytso@....edu, jack@...e.cz, adilger.kernel@...ger.ca
Cc:     linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        hch@...radead.org, david@...morbit.com, darrick.wong@...cle.com
Subject: [PATCH v4 0/8] ext4: port direct I/O to iomap infrastructure

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ