Re: Re: [PATCH v2] fuse: honor desc offset in readahead reads
Horst Birthelmer <[email protected]> Fri, 17 Jul 2026 12:17:55 +0200
| Newsgroups | dev.linux.lists.fuse-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 17, 2026 at 10:56:20AM +0200, Miklos Szeredi wrote: > On Fri, 17 Jul 2026 at 05:28, Haofeng Li <[email protected]> wrote: > > > > fuse_handle_readahead records non-zero descs[].offset when > > iomap skips leading uptodate blocks in a folio, but > > fuse_send_readpages built FUSE_READ from folio_pos() alone. > > The reply was still copied at descs[0].offset, so wrong > > file data was placed into the page cache. > > > > Add descs[0].offset to the request position. Apply the > > same correction in fuse_short_read for EOF size updates. > > > > Fixes: 4ea907108a5c ("fuse: use iomap for readahead") > > Signed-off-by: Haofeng Li <[email protected]> > > Reviewed-by: Joanne Koong <[email protected]> > > Sashiko founds some more cases: > https://sashiko.dev/#/patchset/20260717032835.922433-1-lihaofeng%40kylinos.cn > > This is a large folio issue, right? I do wonder why fsx-linux missed > these with the large folios enabled. I think it probably never occured since fuse_readahead() only fills in folio boundaries? This could be coincidence or readahead controls 'job'. I'm not that familiar with that code. I just got suspicious on your question, since I have large folios enabled in testing, too, and have not seen the case. > > Thanks, > Miklos >