On Thu, Dec 03, 2020 at 02:10:56PM +0000, David Howells wrote: > Note that I'm only doing async DIO reads and writes, so I was a bit surprised > that XFS is doing a writeback at all - but I guess that IOCB_DIRECT is > actually just a hint and the filesystem can turn it into buffered I/O if it > wants. That's almost the exact opposite of what is going on. XFS sees that you're going to do an O_DIRECT read, so it writes back the dirty memory that's currently in the page cache so that your read doesn't read stale data from disk.