On Thu, Sep 01, 2022 at 03:01:15PM -0700, Vishal Moola (Oracle) wrote: > This patch series replaces find_get_pages_range_tag() with > filemap_get_folios_tag(). This also allows the removal of multiple > calls to compound_head() throughout. > It also makes a good chunk of the straightforward conversions to folios, > and takes the opportunity to introduce a function that grabs a folio > from the pagecache. > > F2fs and Ceph have quite alot of work to be done regarding folios, so > for now those patches only have the changes necessary for the removal of > find_get_pages_range_tag(), and only support folios of size 1 (which is > all they use right now anyways). > > I've run xfstests on btrfs, ext4, f2fs, and nilfs2, but more testing may be > beneficial. Well, that answers my question about how filesystems that enable multi-page folios were tested: they weren't. I'd suggest that anyone working on further extending the filemap/folio infrastructure really needs to be testing XFS as a first priority, and then other filesystems as a secondary concern. That's because XFS (via the fs/iomap infrastructure) is one of only 3 filesystems in the kernel (AFS and tmpfs are the others) that interact with the page cache and page cache "pages" solely via folio interfaces. As such they are able to support multi-page folios in the page cache. All of the tested filesystems still use the fixed PAGE_SIZE page interfaces to interact with the page cache, so they don't actually exercise interactions with multi-page folios at all. Hence if you are converting generic infrastructure that looks up pages in the page cache to look up folios in the page cache, the code that processes the returned folios also needs to be updated and validated to ensure that it correctly handles multi-page folios. And the only way you can do that fully at this point in time is via testing XFS or AFS... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx