Re: [PATCH] orangefs: use folio_pos() and folio_size() in orangefs_page_mkwrite()

Matthew Wilcox <[email protected]>
Newsgroups gmane.linux.file-systems,gmane.linux.kernel
Message-ID <[email protected]>
On Sun, Aug 09, 2026 at 04:07:10PM -0400, Tal Zussman wrote:
> orangefs_page_mkwrite() records the faulted range with
> page_offset(vmf->page) and PAGE_SIZE, although the write range it sets
> is attached to the folio and the rest of the function already operates
> on folios. Use folio_pos() and folio_size() instead. This gets rid of
> two calls to page_offset(), removing two calls to compound_head().
> 
> No functional change. orangefs folios are always order-0, so the values
> are identical. However, if orangefs ever enables large folios, this
> change is necessary for correctness with the current write range
> tracking scheme. Tracking only a single page of a larger folio would
> leave the rest of the folio's dirty data outside the range that gets
> written back, leading to data loss.

Yeah, I agree.

Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.