linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: David Howells <dhowells@redhat.com>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] mm/readahead: Handle ractl nr_pages being modified
Date: Tue, 20 Apr 2021 22:03:28 +0100	[thread overview]
Message-ID: <20210420210328.GD3596236@casper.infradead.org> (raw)
In-Reply-To: <3675c1d23577dded6ca97e0be78c153ce3401e10.camel@kernel.org>

On Tue, Apr 20, 2021 at 04:12:57PM -0400, Jeff Layton wrote:
> > @@ -210,6 +208,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
> >  			 * not worth getting one just for that.
> >  			 */
> >  			read_pages(ractl, &page_pool, true);
> > +			i = ractl->_index + ractl->_nr_pages - index;

			i = ractl->_index + ractl->_nr_pages - index - 1;

> > @@ -223,6 +222,7 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
> >  					gfp_mask) < 0) {
> >  			put_page(page);
> >  			read_pages(ractl, &page_pool, true);
> > +			i = ractl->_index + ractl->_nr_pages - index;

			i = ractl->_index + ractl->_nr_pages - index - 1;

> Thanks Willy, but I think this may not be quite right. A kernel with
> this patch failed to boot for me:

Silly off-by-one errors.  xfstests running against xfs is up to generic/278
with the off-by-one fixed.

  reply	other threads:[~2021-04-20 21:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 20:01 [PATCH] mm/readahead: Handle ractl nr_pages being modified Matthew Wilcox (Oracle)
2021-04-20 20:06 ` Matthew Wilcox
2021-04-20 20:12 ` Jeff Layton
2021-04-20 21:03   ` Matthew Wilcox [this message]
2021-04-21 16:49     ` Jeff Layton
2021-04-21 10:34   ` David Howells
2021-04-21 12:27     ` Matthew Wilcox

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=20210420210328.GD3596236@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).