On Mon, Feb 27, 2023 at 12:39:26PM +0100, Jan Kara wrote: > Do you mean to copy these pages on fsync(2) to newly allocated buffer and > then submit it via direct IO? That looks sensible to me. We could then make > writeback path just completely ignore these long term pinned pages and just > add this copying logic into filemap_fdatawrite() or something like that. I don't think we'd even have to copy them on fsync. Just do an in-kernel ITER_BVEC direct I/O on them. The only hard part would be to come up with a way to skip the pagecache invalidation and writeout for these I/Os.