Re: [PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio

2024-05-01 Thread David Howells
David Howells wrote: > + .range_start= first, > + .range_end = last, > ... > + truncate_inode_pages_range(mapping, first, last); These actually take file offsets and not page ranges and so the attached change is needed. Without this, the gene

Re: [PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio

2024-04-30 Thread Christoph Hellwig
> + unmap_mapping_pages(mapping, first, nr, false); > +} > +EXPORT_SYMBOL(filemap_invalidate_inode); unmap_mapping_pages is an EXPORT_SYMBOL_GPL, pleas keep that in this in thin wrapper.

[PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio

2024-04-30 Thread David Howells
Implement a replacement for launder_folio. The key feature of invalidate_inode_pages2() is that it locks each folio individually, unmaps it to prevent mmap'd accesses interfering and calls the ->launder_folio() address_space op to flush it. This has problems: firstly, each folio is written indivi