ext4: port direct I/O to iomap infrastructure
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest11 patches 10 repliesIn review
- v611 patches 18 repliesSuperseded
- v512 patches 37 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 8 patches | 38 replies | Superseded | |
| v3 | 6 patches | 28 replies | Superseded | |
| v2 | 6 patches | 14 replies | Superseded | |
| v1 | 5 patches | 40 replies | Superseded |
Changes in v7 from the cover letter
- 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.
Patches in v7 No applies recorded yet
Reviews trailers per patch
All 11 patches have a Reviewed-by or Acked-by.
| Patch | Jan Kara | Ritesh Harjani |
|---|---|---|
| 1/11 | R-b | R-b |
| 2/11 | R-b | R-b |
| 3/11 | R-b | R-b |
| 4/11 | R-b | R-b |
| 5/11 | R-b | R-b |
| 6/11 | R-b | R-b |
| 7/11 | R-b | R-b |
| 8/11 | R-b | R-b |
| 9/11 | R-b | R-b |
| 10/11 | R-b | R-b |
| 11/11 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v7 00/11] ext4: port direct I/O to iomap infrastructure
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(-)
Signature · 1 line
2.20.1