On Tue, Apr 06, 2021 at 05:25:30PM +0100, Matthew Wilcox wrote: > About a third of ->index can be folio_offset(), based on a crude: > > $ git grep 'page->index.*PAGE_' |wc -l > 101 > > and I absolutely don't mind cleaning that up as part of the folio work, > but that still leaves 200-250 instances that would need to be changed > later. > > I don't want to change the page->mapping to calls to folio_mapping(). > That's a lot of extra work for a page which the filesystem knows belongs > to it. folio_mapping() only needs to be used for pages which might not > belong to a filesystem. > > page_file_mapping() absolutely needs to go away. The way to do that > is to change swap-over-nfs to use direct IO, and then NFS can use > folio->mapping like all other filesystems. f2fs is just terminally > confused and shouldn't be using page_file_mapping at all. I'll fix > that as part of the folio work. Thanks. So my opinion for now remains preferably just don't add the union and derefence through the page. But I'm not going to block the series for it, as I think it is a huge and badly needed cleanup required to make further use of larger pages / large chunks of memory in the pagecache and the file systems.