On Thu, May 24, 2018 at 10:02:54AM -0600, Jens Axboe wrote: > a_ops->readpages() is only ever used for read-ahead. Ensure that we > pass this information down to the block layer. > > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> > --- > fs/ext4/readpage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c > index 9ffa6fad18db..92b28273b223 100644 > --- a/fs/ext4/readpage.c > +++ b/fs/ext4/readpage.c > @@ -259,7 +259,7 @@ int ext4_mpage_readpages(struct address_space *mapping, > bio->bi_iter.bi_sector = blocks[0] << (blkbits - 9); > bio->bi_end_io = mpage_end_io; > bio->bi_private = ctx; > - bio_set_op_attrs(bio, REQ_OP_READ, 0); > + bio_set_op_attrs(bio, REQ_OP_READ, REQ_RAHEAD); > } The problem is that ext4_readpage() also calls ext4_mpage_readpages(). So you can't set REQ_RAHEAD unconditionally here. - Ted