Re: [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-14 Thread Matthew Wilcox
On Thu, Feb 13, 2020 at 09:36:25PM -0800, John Hubbard wrote: > > +static inline struct page *readahead_page(struct readahead_control *rac) > > +{ > > + struct page *page; > > + > > + if (!rac->nr_pages) > > + return NULL; > > + > > + page = xa_load(>mapping->i_pages, rac->start);

Re: [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-13 Thread John Hubbard
On 2/10/20 5:03 PM, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > This replaces ->readpages with a saner interface: > - Return void instead of an ignored error code. > - Pages are already in the page cache when ->readahead is called. > - Implementation looks up the pages in the

Re: [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-12 Thread Christoph Hellwig
On Mon, Feb 10, 2020 at 05:03:39PM -0800, Matthew Wilcox wrote: > +struct readahead_control { > + struct file *file; > + struct address_space *mapping; > +/* private: use the readahead_* accessors instead */ > + pgoff_t start; > + unsigned int nr_pages; > + unsigned int

Re: [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-11 Thread Dave Chinner
On Tue, Feb 11, 2020 at 04:54:13AM -0800, Matthew Wilcox wrote: > On Tue, Feb 11, 2020 at 03:52:30PM +1100, Dave Chinner wrote: > > > +struct readahead_control { > > > + struct file *file; > > > + struct address_space *mapping; > > > +/* private: use the readahead_* accessors instead */ > > > +

Re: [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-11 Thread Matthew Wilcox
On Tue, Feb 11, 2020 at 03:52:30PM +1100, Dave Chinner wrote: > > +struct readahead_control { > > + struct file *file; > > + struct address_space *mapping; > > +/* private: use the readahead_* accessors instead */ > > + pgoff_t start; > > + unsigned int nr_pages; > > + unsigned int

Re: [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-10 Thread Dave Chinner
On Mon, Feb 10, 2020 at 05:03:39PM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > This replaces ->readpages with a saner interface: > - Return void instead of an ignored error code. > - Pages are already in the page cache when ->readahead is called. > - Implementation