On Tue, May 26, 2020 at 5:47 PM Goldwyn Rodrigues <rgoldwyn@xxxxxxx> wrote: > > On 15:03 26/05, Johannes Thumshirn wrote: > > Just as a heads up, this one gives me lot's of Page cache invalidation > > failure prints from dio_warn_stale_pagecache() on btrfs/004 with > > current misc-next: > > > <snip> > > > [ 23.696400] Page cache invalidation failure on direct I/O. Possible data corruption due to collision with buffered I/O! > > [ 23.698115] File: /mnt/scratch/bgnoise/p0/f0 PID: 6562 Comm: fsstress > > > > I have no idea yet why but I'm investigating. > > This is caused because we are trying to release a page when the extent > has locked the page and release page returns false. By "we" you mean what exaclty, a direct IO read, a direct IO write? And who locked the extent range before? That seems alarming to me, specially if it's a direct IO write failing to invalidate the page cache, since a subsequent buffered read could get stale data (what's in the page cache), and not what the direct IO write wrote. Can you elaborate more on all those details? Thanks. > To minimize the > effect, I had proposed a patch [1] in v6. However, this created > more extent locking issues and so was dropped. > > [1] https://patchwork.kernel.org/patch/11275063/ > > -- > Goldwyn -- Filipe David Manana, “Whether you think you can, or you think you can't — you're right.”
