From: Horst Birthelmer <horst@birthelmer.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Haofeng Li <lihaofeng@kylinos.cn>,
joannelkoong@gmail.com, fuse-devel@lists.linux.dev,
linux-kernel@vger.kernel.org, djwong@kernel.org,
brauner@kernel.org
Subject: Re: Re: [PATCH v2] fuse: honor desc offset in readahead reads
Date: Fri, 17 Jul 2026 12:17:55 +0200 [thread overview]
Message-ID: <aln_xvOTDN_xIHFD@fedora.fritz.box> (raw)
In-Reply-To: <CAJfpegv=akLW1qzq=B=F11Qfx5Gg8qoRiV4Z-pty-0Og+sU4GQ@mail.gmail.com>
On Fri, Jul 17, 2026 at 10:56:20AM +0200, Miklos Szeredi wrote:
> On Fri, 17 Jul 2026 at 05:28, Haofeng Li <lihaofeng@kylinos.cn> 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 <lihaofeng@kylinos.cn>
> > Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
>
> 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
>
next prev parent reply other threads:[~2026-07-17 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 9:40 [PATCH] fuse: honor desc offset in readahead reads Haofeng Li
2026-07-16 18:11 ` Joanne Koong
2026-07-17 3:03 ` Haofeng Li
2026-07-17 3:28 ` [PATCH v2] " Haofeng Li
2026-07-17 8:56 ` Miklos Szeredi
2026-07-17 10:17 ` Horst Birthelmer [this message]
2026-07-17 18:37 ` Haofeng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aln_xvOTDN_xIHFD@fedora.fritz.box \
--to=horst@birthelmer.de \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=fuse-devel@lists.linux.dev \
--cc=joannelkoong@gmail.com \
--cc=lihaofeng@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.