From: Matthew Wilcox <willy@infradead.org>
To: "Jürg Billeter" <j@bitron.ch>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
linux-fsdevel@vger.kernel.org, regressions@lists.linux.dev
Subject: Re: [REGRESSION] fuse: copy_file_range() fails with EIO
Date: Fri, 9 Aug 2024 17:03:56 +0100 [thread overview]
Message-ID: <ZrY97Pq9xM-fFhU2@casper.infradead.org> (raw)
In-Reply-To: <792a3f54b1d528c2b056ae3c4ebaefe46bca8ef9.camel@bitron.ch>
On Fri, Aug 09, 2024 at 05:53:26PM +0200, Jürg Billeter wrote:
> Starting with 6.10, I'm seeing `copy_file_range()`, with source and
> destination being on the same FUSE filesystem[1], failing with EIO in
> some cases. The (low-level libfuse3) userspace filesystem does not
> implement `copy_file_range`, so the kernel falls back to the generic
> implementation. The userspace filesystem receives read requests and
> replies with the `FUSE_BUF_SPLICE_MOVE` flag.
>
> I'm not sure what exactly triggers the issue but it may depend on the
> file size, among other things. I can reproduce it fairly reliably
> attempting to copy files that are exactly 65536 bytes in size.
>
> 6.9 works fine but I see the issue in 6.10, 6.10.3 and also in current
> master ee9a43b7cfe2.
>
> 413e8f014c8b848e4ce939156f210df59fbd1c24 is the first bad commit
> commit 413e8f014c8b848e4ce939156f210df59fbd1c24 (HEAD)
> Author: Matthew Wilcox (Oracle) <willy@infradead.org>
> Date: Sat Apr 20 03:50:06 2024 +0100
>
> fuse: Convert fuse_readpages_end() to use folio_end_read()
>
> Nobody checks the error flag on fuse folios, so stop setting it.
> Optimise the (optional) setting of the uptodate flag and clearing
> of the lock flag by using folio_end_read().
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
>
> I've confirmed the bisection by reverting this commit on top of 6.10.3,
> which resolves the issue.
Umm. I don't see it. This is all that's in the commit:
for (i = 0; i < ap->num_pages; i++) {
- struct page *page = ap->pages[i];
+ struct folio *folio = page_folio(ap->pages[i]);
- if (!err)
- SetPageUptodate(page);
- else
- SetPageError(page);
- unlock_page(page);
- put_page(page);
+ folio_end_read(folio, !err);
+ folio_put(folio);
}
Do you have CONFIG_DEBUG_VM enabled? There are some debugging asserts
which that will enable that might indicate a problem.
Otherwise we can try splitting the commit into individual steps and
seeing which one shows the problem.
next prev parent reply other threads:[~2024-08-09 16:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 15:53 [REGRESSION] fuse: copy_file_range() fails with EIO Jürg Billeter
2024-08-09 16:03 ` Matthew Wilcox [this message]
2024-08-09 16:22 ` [PATCH 1/3] fuse: remove call to SetPageError Matthew Wilcox (Oracle)
2024-08-09 16:22 ` [PATCH 2/3] fuse: Use a folio instead of a page Matthew Wilcox (Oracle)
2024-08-09 16:22 ` [PATCH 3/3] fuse: use folio_end_read Matthew Wilcox (Oracle)
2024-08-10 12:24 ` Jürg Billeter
2024-08-20 12:57 ` Jürg Billeter
2024-08-20 13:50 ` Matthew Wilcox
2024-08-22 11:58 ` Miklos Szeredi
2024-08-22 12:25 ` Matthew Wilcox
2024-08-10 5:56 ` [REGRESSION] fuse: copy_file_range() fails with EIO Jürg Billeter
2024-08-10 15:12 ` Matthew Wilcox
2024-08-22 13:04 ` Miklos Szeredi
2024-08-22 13:12 ` Jürg Billeter
2024-08-22 13:14 ` Miklos Szeredi
2024-08-22 13:32 ` Miklos Szeredi
2024-08-22 14:14 ` Jürg Billeter
2024-08-29 9:27 ` Marcel Ziswiler
2024-08-29 9:30 ` Miklos Szeredi
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=ZrY97Pq9xM-fFhU2@casper.infradead.org \
--to=willy@infradead.org \
--cc=j@bitron.ch \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=regressions@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).