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
> + 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.
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