On Wed, Apr 21, 2021 at 11:34:44AM +0100, David Howells wrote: > Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > 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. > > You can add my Tested-by - or do you want me to add it to my patchset? I think you need it as part of your patchset, ordered before readahead_expand(). It probably needs a rewritten description ...