Skip to content

Submit ->readpages() IO as read-ahead

Jens Axboe linux-fsdevel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 6 repliesIn review
  2. v34 patches 11 repliesSuperseded
  3. v24 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches12 repliesSuperseded

Changes in v4 from the cover letter

- Add comments on ->readpages() purely being read-ahead
- Rebase on current -git

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mpage: add argument structure for do_mpage_readpage()fs/mpage.c+54 -520 replies
2/4mpage: mpage_readpages() should submit IO as read-aheadfs/f2fs/data.c fs/mpage.c include/linux/fs.h+28 -106 replies
3/4btrfs: readpages() should submit IO as read-aheadfs/btrfs/extent_io.c+1 -10 replies
4/4ext4: readpages() should submit IO as read-aheadfs/ext4/ext4.h fs/ext4/inode.c fs/ext4/readpage.c+7 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/4] Submit ->readpages() IO as read-ahead

The only caller of ->readpages() is from read-ahead, yet we don't submit IO flagged with REQ_RAHEAD. This means we don't see it in blktrace, for instance, which is a shame. Additionally, it's preventing further functional changes in the block layer for deadling with read-ahead more intelligently. We already make assumptions about ->readpages() just being for read-ahead in the mpage implementation, using readahead_gfp_mask(mapping) as out GFP mask of choice.

This small series fixes up mpage_readpages() to submit with REQ_RAHEAD, which takes care of file systems using mpage_readpages(). The first patch is a prep patch, that makes do_mpage_readpage() take an argument structure.

Changes since v3:

- Add comments on ->readpages() purely being read-ahead
- Rebase on current -git

Changes since v2:

- Get rid of 'gfp' passing once we have is_readahead
- Pack struct better, makes it 8 bytes smaller.

Changes since v1:

- Fix ext4_mpage_readpages() also being used for regular reads
- Add prep patch with struct arguments for do_mpage_readpage()

 fs/btrfs/extent_io.c |   2 +-
 fs/ext4/ext4.h       |   2 +-
 fs/ext4/inode.c      |   5 +-
 fs/ext4/readpage.c   |   5 +-
 fs/f2fs/data.c       |   5 ++
 fs/mpage.c           | 115 ++++++++++++++++++++++++-------------------
 include/linux/fs.h   |   4 ++
 7 files changed, 80 insertions(+), 58 deletions(-)
Signature · 1 line
Jens Axboe