On Thu, Mar 20, 2025 at 08:05:26PM -0700, Darrick J. Wong wrote: > > So now applications need to be careful to not submit any direct-io & > > buffered-io in parallel with such above patterns on a raw block device, > > correct? That is what I would like to confirm. > > I think that's correct, and kind of horrifying if true. I wonder if > ->invalidate_folio might be a reasonable way to clear the uptodate bits > on the relevant parts of a large folio without having to split or remove > it? FWIW, I've always recommended not mixing DIO and buffered I/O, either for filesystems or block device. > > >> And IIUC, what Linux recommends is to never mix any kind of direct-io > > >> and buffered-io when doing I/O on raw block devices, but I cannot find > > >> this recommendation in any Documentation? So can someone please point me > > >> one where we recommend this? > > > > And this ^^^