On Tue, Apr 09, 2024 at 03:39:35PM +0200, David Hildenbrand wrote: > On 05.04.24 20:00, Matthew Wilcox (Oracle) wrote: > > + * Handle extension of inode size either caused by extending truncate or > > + * by write starting after current i_size. We mark the page straddling > > + * current i_size RO so that page_mkwrite() is called on the first > > + * write access to the page. The filesystem will update its per-block > > + * information before user writes to the page via mmap after the i_size > > + * has been changed. > > Did you intend not to s/page/folio/ ? I did! I think here we're talking about page faults, and we can control the RO property on a per-PTE (ie per-page) basis. Do you think it'd be clearer if we talked about folios here? We're in a bit of an interesting spot because filesystems generally don't have folios which overhang the end of the file by more than a page. It can happen if truncate fails to split a folio. > Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> Thanks!