linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
	akpm@linux-foundation.org
Subject: Re: [PATCH 3/3] ext4: readpages() should submit IO as read-ahead
Date: Thu, 24 May 2018 14:53:43 -0600	[thread overview]
Message-ID: <ae2abf3b-2061-bade-c4b0-af88092d0554@kernel.dk> (raw)
In-Reply-To: <20180524204730.GC7712@thunk.org>

On 5/24/18 2:47 PM, Theodore Y. Ts'o wrote:
> 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@kernel.dk>
>> ---
>>  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.

Oh shoot, yeah I did miss that. I'll update it, thanks Ted.

-- 
Jens Axboe

  reply	other threads:[~2018-05-24 20:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 16:02 [PATCHSET 0/3] Submit ->readpages() IO as read-ahead Jens Axboe
2018-05-24 16:02 ` [PATCH 1/3] mpage: mpage_readpages() should submit " Jens Axboe
2018-05-24 19:43   ` Andrew Morton
2018-05-24 19:57     ` Matthew Wilcox
2018-05-24 20:24       ` Jens Axboe
2018-05-29 14:36     ` Jens Axboe
2018-05-29 21:59       ` Andrew Morton
2018-05-29 22:18         ` Jens Axboe
2018-05-29 22:37           ` Jens Axboe
2018-05-24 16:02 ` [PATCH 2/3] btrfs: readpages() " Jens Axboe
2018-05-24 16:02 ` [PATCH 3/3] ext4: " Jens Axboe
2018-05-24 20:47   ` Theodore Y. Ts'o
2018-05-24 20:53     ` Jens Axboe [this message]
2018-05-24 21:05       ` Jens Axboe
2018-05-25  8:32 ` [PATCHSET 0/3] Submit ->readpages() " Christoph Hellwig
2018-05-25 14:21   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae2abf3b-2061-bade-c4b0-af88092d0554@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).