linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: "Luís Henriques" <lhenriques@suse.de>
Cc: Amir Goldstein <amir73il@gmail.com>,
	He Zhe <zhe.he@windriver.com>, Dave Chinner <dchinner@redhat.com>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Luis Henriques <lhenriques@suse.com>
Subject: Re: warning for EOPNOTSUPP vfs_copy_file_range
Date: Thu, 19 May 2022 23:16:03 -0400	[thread overview]
Message-ID: <20220520031603.GA54241@windriver.com> (raw)
In-Reply-To: <87czg94msb.fsf@brahms.olymp>

[Re: warning for EOPNOTSUPP vfs_copy_file_range] On 19/05/2022 (Thu 15:31) Luís Henriques wrote:

> Amir Goldstein <amir73il@gmail.com> writes:
> 
> > On Thu, May 19, 2022 at 11:22 AM He Zhe <zhe.he@windriver.com> wrote:
> >>
> >> Hi,
> >>
> >> We are experiencing the following warning from
> >> "WARN_ON_ONCE(ret == -EOPNOTSUPP);" in vfs_copy_file_range, from
> >> 64bf5ff58dff ("vfs: no fallback for ->copy_file_range")
> >>
> >> # cat /sys/class/net/can0/phys_switch_id
> >>
> >> WARNING: CPU: 7 PID: 673 at fs/read_write.c:1516 vfs_copy_file_range+0x380/0x440

[...]

> > Sigh! Those filesystems have no business doing copy_file_range()
> >
> > Here is a patch that Luis has been trying to push last year
> > to fix a problem with copy_file_range() from tracefs:
> >
> > https://lore.kernel.org/linux-fsdevel/20210702090012.28458-1-lhenriques@suse.de/
> 
> Yikes!  It's been a while and I completely forgot about it.  I can
> definitely try to respin this patch if someone's interested in picking
> it.  I'll have to go re-read everything again and see what's missing and
> what has changed in between.

If it helps any, you don't need CAN bus or anything complicated.  I was
able to reproduce it with the loopback device on linux-next of today
with a new userspace (from Yocto) that actively uses copy_file_range()

Note that a cp or redirect is needed to trigger the copy - with the
new userspace requiremet.  Or write your own reproducer that goes at the
syscall directly on an old userspace (untested by me).

  root@qemux86-64:/sys/class/net/lo# cat phys_switch_id
  cat: phys_switch_id: Operation not supported
  root@qemux86-64:/sys/class/net/lo# cat phys_switch_id > /tmp/foo
  [   87.527506] ------------[ cut here ]------------
  [   87.527675] WARNING: CPU: 2 PID: 238 at /home/paul/git/linux-head/fs/read_write.c:1511 vfs_copy_file_range+0x47c/0x4e0
  
Paul.
--

> 
> Cheers,
> -- 
> Luís
> 
> > Luis gave up on it, because no maintainer stepped up to take
> > the patch, but I think that is the right way to go.
> >
> > Maybe this bug report can raise awareness to that old patch.
> >
> > Al, could you have a look?
> >
> > Thanks,
> > Amir.
> >

  parent reply	other threads:[~2022-05-20  3:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  8:22 warning for EOPNOTSUPP vfs_copy_file_range He Zhe
2022-05-19 13:53 ` Amir Goldstein
2022-05-19 14:31   ` Luís Henriques
2022-05-20  3:03     ` He Zhe
2022-05-20  4:42       ` Amir Goldstein
2022-05-20  3:16     ` Paul Gortmaker [this message]
2022-05-20  3:56   ` Al Viro
2022-05-20  4:39     ` Amir Goldstein
2022-05-20  7:52       ` Amir Goldstein

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=20220520031603.GA54241@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=amir73il@gmail.com \
    --cc=dchinner@redhat.com \
    --cc=lhenriques@suse.com \
    --cc=lhenriques@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zhe.he@windriver.com \
    /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).