Re: [f2fs-dev] [PATCH v10 24/25] fuse: Convert from readpages to readahead

2020-03-25 Thread Miklos Szeredi
On Wed, Mar 25, 2020 at 4:32 PM Matthew Wilcox wrote: > > On Wed, Mar 25, 2020 at 03:43:02PM +0100, Miklos Szeredi wrote: > > > > > > - while ((page = readahead_page(rac))) { > > > - if (fuse_readpages_fill(, page) != 0) > > > + nr_pages =

Re: [f2fs-dev] [PATCH v10 24/25] fuse: Convert from readpages to readahead

2020-03-25 Thread Matthew Wilcox
On Wed, Mar 25, 2020 at 03:43:02PM +0100, Miklos Szeredi wrote: > > > > - while ((page = readahead_page(rac))) { > > - if (fuse_readpages_fill(, page) != 0) > > + nr_pages = min(readahead_count(rac), fc->max_pages); > > Missing fc->max_read clamp. Yeah, I

Re: [f2fs-dev] [PATCH v10 24/25] fuse: Convert from readpages to readahead

2020-03-25 Thread Miklos Szeredi
On Wed, Mar 25, 2020 at 1:02 PM Matthew Wilcox wrote: > > On Wed, Mar 25, 2020 at 10:42:56AM +0100, Miklos Szeredi wrote: > > > + while ((page = readahead_page(rac))) { > > > + if (fuse_readpages_fill(, page) != 0) > > > > Shouldn't this unlock + put page on error? > > We're

Re: [f2fs-dev] [PATCH v10 24/25] fuse: Convert from readpages to readahead

2020-03-25 Thread Matthew Wilcox
On Wed, Mar 25, 2020 at 10:42:56AM +0100, Miklos Szeredi wrote: > > + while ((page = readahead_page(rac))) { > > + if (fuse_readpages_fill(, page) != 0) > > Shouldn't this unlock + put page on error? We're certainly inconsistent between the two error exits from

Re: [f2fs-dev] [PATCH v10 24/25] fuse: Convert from readpages to readahead

2020-03-25 Thread Miklos Szeredi
On Mon, Mar 23, 2020 at 9:23 PM Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in fuse. Switching away from the > read_cache_pages() helper gets rid of an implicit call to put_page(), > so we can get rid of the get_page() call in