Re: [PATCH] mm/readahead: Handle ractl nr_pages being modified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2021-04-20 at 22:03 +0100, Matthew Wilcox 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.


It worked fine with that change in place. You can add:

Tested-by: Jeff Layton <jlayton@xxxxxxxxxx>




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux