2023-09-16 02:34:47

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [RFC 08/23] filemap: align the index to mapping_min_order in filemap_get_folios_tag()

On Fri, Sep 15, 2023 at 08:38:33PM +0200, Pankaj Raghav wrote:
> From: Luis Chamberlain <[email protected]>
>
> Align the index to the mapping_min_order number of pages while setting
> the XA_STATE in filemap_get_folios_tag().

... because? It should already search backwards in the page cache,
otherwise calling sync_file_range() would skip the start if it landed
in a tail page of a folio.


2023-09-19 04:55:18

by Luis Chamberlain

[permalink] [raw]
Subject: Re: [RFC 08/23] filemap: align the index to mapping_min_order in filemap_get_folios_tag()

On Fri, Sep 15, 2023 at 08:50:59PM +0100, Matthew Wilcox wrote:
> On Fri, Sep 15, 2023 at 08:38:33PM +0200, Pankaj Raghav wrote:
> > From: Luis Chamberlain <[email protected]>
> >
> > Align the index to the mapping_min_order number of pages while setting
> > the XA_STATE in filemap_get_folios_tag().
>
> ... because? It should already search backwards in the page cache,
> otherwise calling sync_file_range() would skip the start if it landed
> in a tail page of a folio.

Thanks! Will drop and verify!

Luis