On Tue, Jun 24, 2025 at 10:26:01PM -0700, Joanne Koong wrote: > > The question is whether this is acceptable for all the filesystem > > which implement ->launder_folio today. Because we could just move the > > folio_test_dirty() to after the folio_lock() and remove all the testing > > of folio dirtiness from individual filesystems. > > Or could the filesystems that implement ->launder_folio (from what I > see, there's only 4: fuse, nfs, btrfs, and orangefs) just move that > logic into their .release_folio implementation? I don't see why not. > In folio_unmap_invalidate(), we call: Without even looking into the details from the iomap POV that basically doesn't matter. You'd still need the write back a single locked folio interface, which adds API surface, and because it only writes a single folio at a time is rather inefficient. Not a deal breaker because the current version look ok, but it would still be preferable to not have an extra magic interface for it.