Re: [PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-28 Thread Christoph Hellwig
On Tue, Oct 27, 2020 at 08:04:58PM +, Matthew Wilcox wrote: > I have that patch here: > > http://git.infradead.org/users/willy/pagecache.git/commitdiff/a4e435b5ed14a0b898da6e5a66fe232f467b8ba1 > > I was going to let this patch go upstream through Andrew's tree, then > submit that one through

Re: [PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-27 Thread Matthew Wilcox
On Tue, Oct 27, 2020 at 06:58:09PM +, Christoph Hellwig wrote: > > +/** > > + * mapping_seek_hole_data - Seek for SEEK_DATA / SEEK_HOLE in the page > > cache. > > + * @mapping: Address space to search. > > + * @start: First byte to consider. > > + * @end: Limit of search (exclusive). > > + * @

Re: [PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-27 Thread Christoph Hellwig
> +/** > + * mapping_seek_hole_data - Seek for SEEK_DATA / SEEK_HOLE in the page cache. > + * @mapping: Address space to search. > + * @start: First byte to consider. > + * @end: Limit of search (exclusive). > + * @whence: Either SEEK_HOLE or SEEK_DATA. > + * > + * If the page cache knows which blo

Re: [PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-26 Thread Jan Kara
On Mon 26-10-20 12:17:27, Matthew Wilcox wrote: > On Mon, Oct 26, 2020 at 11:48:06AM +0100, Jan Kara wrote: > > > +static inline loff_t page_seek_hole_data(struct page *page, > > > + loff_t start, loff_t end, bool seek_data) > > > +{ > > > + if (xa_is_value(page) || PageUptodate(page)) > >

Re: [PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-26 Thread Matthew Wilcox
On Mon, Oct 26, 2020 at 11:48:06AM +0100, Jan Kara wrote: > > +static inline loff_t page_seek_hole_data(struct page *page, > > + loff_t start, loff_t end, bool seek_data) > > +{ > > + if (xa_is_value(page) || PageUptodate(page)) > > Please add a comment here that this is currently tmpf

Re: [PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-26 Thread Jan Kara
On Mon 26-10-20 04:14:00, Matthew Wilcox (Oracle) wrote: > Rewrite shmem_seek_hole_data() and move it to filemap.c. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: William Kucharski > --- > include/linux/pagemap.h | 2 ++ > mm/filemap.c| 76 +++

[PATCH v3 04/12] mm/filemap: Add mapping_seek_hole_data

2020-10-25 Thread Matthew Wilcox (Oracle)
Rewrite shmem_seek_hole_data() and move it to filemap.c. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski --- include/linux/pagemap.h | 2 ++ mm/filemap.c| 76 + mm/shmem.c | 72 +++---