Re: [PATCH RFC] mm/filemap: fix lseek() skipping a new large folio
From: Matthew Wilcox
Date: Thu Nov 12 2026 - 13:27:23 EST
On Wed, Nov 11, 2026 at 12:45:45PM +0100, Jan Kara wrote:
> I just find it unfortunate that we have to play complicated games like
> these for such a simple operation as sequentially iterating over all folios
> in a mapping. And it is not a first bug of this nature trigered by
> compaction. So longer term I believe we need to provide saner apis
> shielding pagecache users from these nasty details.
I think the long-term fix is to switch to the maple tree as the backend
of the xarray. Then there is only one slot for any folio and we should
be able to unambiguusly iterate over all present folios.