On Wed, Dec 08, 2021 at 04:22:56AM +0000, Matthew Wilcox (Oracle) wrote: > We currently store large folios as 2^N consecutive entries. While this > consumes rather more memory than necessary, it also turns out to be buggy. > A writeback operation which starts within a tail page of a dirty folio will > not write back the folio as the xarray's dirty bit is only set on the > head index. With multi-index entries, the dirty bit will be found no > matter where in the folio the operation starts. > > This does end up simplifying the page cache slightly, although not as > much as I had hoped. This looks sensible to me, but I'm not xarray expert. So the only thing I have to offer is a superficial nit: > +static inline > +bool folio_more_pages(struct folio *folio, pgoff_t index, pgoff_t max) Weird identation indentation here.