> 2023年8月1日 18:40,Hao Xu <hao.xu@xxxxxxxxx> 写道: > > Hi Alan, > > > On 8/1/23 18:14, Alan Huang wrote: >>> 2023年8月1日 16:06,Hao Xu <hao.xu@xxxxxxxxx> 写道: >>> >>> From: Hao Xu <howeyxu@xxxxxxxxxxx> >>> >>> In FOPEN_DIRECT_IO, page cache may still be there for a file since >>> private mmap is allowed. Direct write should respect that and invalidate >>> the corresponding pages so that page cache readers don't get stale data. >> Do other filesystems also invalidate page cache in this case? > > > For now all filesystems that use iomap do this invalidation, see: __iomap_dio_rw() Thanks! > > e.g. ext4, xfs > > > Regards, > > Hao >