Skip to contentSkip to conversation

ext2: Use iomap in buffered-io for regular files and enable large folio support

RFC New Ritesh Harjani (IBM) 1 participant 1 message Nov 20, 2023 VFS

lore
Share & tools
lore
#0 lore raw

cover ext2: Use iomap in buffered-io for regular files and enable large folio support

Hello,

Please find this RFC series which converts ext2 regular file's buffered-io path to iomap. The idea behind doing this work is to identify work required to move ext* filesystems to iomap.

Patch-1 is a fix which was identified while working on this series. It causes inode->i_size inconsistency, which also fails generic/091.

Patch-2 is a RFC patch which converts ext2 regular file's buffered-io path to use iomap. The commit msg of that patch gives more details.

Patch-3 is finally a straight forward patch to enable large folio support on ext2.

Note: This series only converts regular file to iomap and not dir or any other type. While doing the conversion, I observed that ext2 uses page cache for directories and it uses fs/buffer.c API - block_write_begin()/block_write_end() for doing so. (look into ext2_prepare_chunk() and ext2_commit_chunk())
We currently don't have an equivalent APIs in iomap for doing the same which can be called from users. So, next I will be spending sometime on ext2 dir conversion.

For now it was discussed to continue the conversion of ext2 regular file's buffered-io path to iomap which is what this series does.

Testing
=========
I have done some minimal testing of the series and haven't found any issue so far. I will test 1k and 4k block size configuration with -g auto and update the results. Meanwhile I wanted to get the series out for an initial review.

Ritesh Harjani (IBM) (3):
ext2: Fix ki_pos update for DIO buffered-io fallback case
ext2: Convert ext2 regular file buffered I/O to use iomap
ext2: Enable large folio support

 fs/ext2/file.c  | 21 ++++++++++++--
 fs/ext2/inode.c | 74 +++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 84 insertions(+), 11 deletions(-)
Signature · 1 line
2.41.0