On Thu, Jan 19, 2023 at 05:04:20AM +0000, Al Viro wrote: > 1) fs/direct-io.c is ancient, grotty and has few remaining users. > The case of block devices got split off first; these days it's in > block/fops.c. Then iomap-using filesystems went to fs/iomap/direct-io.c, > leaving this sucker used only by affs, ext2, fat, exfat, hfs, hfsplus, jfs, > nilfs2, ntfs3, reiserfs, udf and ocfs2. And frankly, the sooner it dies > the better off we are. IOW, you've picked an uninteresting part and left > the important ones untouched. Agreed. That being said if we want file systems (including those not using this legacy version) to be able to rely on correct page dirtying eventually everything needs to pin pages it writes to. So we need to either actually fix or remove this code in the forseeable future. It's by far not the most interesting and highest priority, though. And as I said this series is already too large too review anyway, I'd really prefer to get a core set done ASAP and then iterate on the callers and additional bits. > Unless I misunderstand something fundamental about the whole thing, > this crap should become useless with that conversion. It should - mostly. But we need to be very careful about that, so I'd prefer a separate small series for it to be honest. > BTW, where do we dirty the pages on IO_URING_OP_READ_FIXED with > O_DIRECT file? AFAICS, bio_set_pages_dirty() won't be called > (ITER_BVEC iter) and neither will bio_release_pages() do anything > (BIO_NO_PAGE_REF set on the bio by bio_iov_bvec_set() called > due to the same ITER_BVEC iter). Am I missing something trivial > here? Jens? I don't think we do that all right now.