Re: [PATCH v2] fuse: honor desc offset in readahead reads

Miklos Szeredi <[email protected]> Fri, 17 Jul 2026 10:56:20 +0200
Newsgroups dev.linux.lists.fuse-devel,org.kernel.vger.linux-kernel
Message-ID <CAJfpegv=akLW1qzq=B=F11Qfx5Gg8qoRiV4Z-pty-0Og+sU4GQ@mail.gmail.com>
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.

Thanks,
Miklos