On Thu, 22 Aug 2024 at 15:12, Jürg Billeter <j@xxxxxxxxx> wrote: > > On Thu, 2024-08-22 at 15:04 +0200, Miklos Szeredi wrote: > > On Sat, 10 Aug 2024 at 17:12, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > That's what I suspected was going wrong -- we're trying to end a read on > > > a folio that is already uptodate. Miklos, what the hell is FUSE doing > > > here? > > > > Ah, this is the fancy page cache replacement done in > > fuse_try_move_page(). > > > > I understand how this triggers VM_BUG_ON_FOLIO() in folio_end_read(). > > > > What I don't understand is how this results in the -EIO that Jürg > > reported. > > I'm not really familiar with this code but it seems `folio_end_read()` > uses xor to update the `PG_uptodate` flag. So if it was already set, it > will incorrectly clear the `PG_uptodate` set, which I guess triggers > the issue. Indeed, that would explain this. Thanks, Miklos