From: Matthew Wilcox <willy@infradead.org>
To: Olga Kornievskaia <olga.kornievskaia@gmail.com>
Cc: Amir Goldstein <amir73il@gmail.com>,
Jeff Layton <jlayton@redhat.com>,
viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-nfs <linux-nfs@vger.kernel.org>,
fweimer@redhat.com, Steve French <smfrench@gmail.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH v1 02/11] VFS permit cross device vfs_copy_file_range
Date: Tue, 23 Oct 2018 08:39:41 -0700 [thread overview]
Message-ID: <20181023153941.GE20085@bombadil.infradead.org> (raw)
In-Reply-To: <CAN-5tyHQc3M2YprFJm35XUxJdAx11a85o1NygE5FQFyHq3SQew@mail.gmail.com>
On Tue, Oct 23, 2018 at 11:03:02AM -0400, Olga Kornievskaia wrote:
> On Tue, Oct 23, 2018 at 2:05 AM Amir Goldstein <amir73il@gmail.com> wrote:
> > On Tue, Oct 23, 2018 at 2:39 AM Jeff Layton <jlayton@redhat.com> wrote:
> > > Sorry if I wasn't clear before:
> > >
> > > Basically, I think Willy and I are both envisioning that some
> > > copy_file_range implementations may eventually not be subject to the
> > > limitations of the checks you're adding.
> > >
> >
> > Yes. Eventually. And even Matthew is (quote) "dubious" about that ever
> > happening. Changing the interface as Matthew proposed has a price
> > and we need to compare this price to the alleged backporting price
> > that nobody may ever need to pay.
> >
> > As far as I can tell, passing a struct file * on a file_operations method
> > that does not belong to that filesystem in unprecedented (*) and is a far
> > more lethal landmine than the alleged backporting landmine.
> >
> > (*) prior to v4.19-rc1, filesystems could get an overlayfs file, but
> > file_inode(file) has always belonged to the filesystem.
> >
> > Olga,
> >
> > I do not strongly object to Matthew's proposal, so don't feel
> > obligated to choose my side of the argument. I am just trying
> > to offer a different perspective.
> >
> > In any case, my outstanding concerns with the patch are:
> >
> > 1. If you change syscall to support cross fs type copy (which is
> > good IMO) need to document that in commit message
> > and possibly follow up later with a note in man page
> >
> > 2. Commit message says:
> > "This feature was of interest of ... NFS"
> > "This feature is needed by NFSv4.2..."
> > "NFS will allow for copies between different NFS servers."
> > It is not clear to me if we are talking about present of future
> > NFSv4.2 code. If NFSv4.2 currently does not support cross
> > sb copy (??) than your patch need to enforce same sb
> > in nfs4_copy_file_range(). If it does support cross sb copy
> > than please edit the commit message to make that clear.
>
> I personally agree with Amir. I think it's far fetched that a file
> system would know how to handle something that's not of its type. When
> the copy_file_range() was checked in, there was a comment above the
> superblock check saying "we might want to relax this in the future".
> It deemed appropriate then to enforce the check since none of the file
> systems used it. Now, the future is here, and we are removing the
> check but proposing a different once because again the future isn't
> here and having a single check simplifies the code.
I've done some more research and found that while NFSv4.2 has its own
representation of a copyable range of a file, iSCSI and SMB3 share the
same ROD. So it's not at all implausible that some other filesystem
might also decide to use the same ROD, perhaps even NFS v4.3.
It's clearly crazy to expect filesystem A to know about all the
interpretations of filesystem B's file->private. I'd expect us to add
a function like:
int vfs_get_rod(struct file *src, struct file_rod *rod);
and then a filesystem's copy_file_range() would check to see if both
src and dest referred to the same server, and if not call vfs_get_rod()
to be able to send the ROD to the destination.
next prev parent reply other threads:[~2018-10-24 0:03 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 15:30 [PATCH v1 01/11] fs: Don't copy beyond the end of the file Olga Kornievskaia
2018-10-19 15:30 ` [PATCH v1 02/11] VFS permit cross device vfs_copy_file_range Olga Kornievskaia
2018-10-19 15:54 ` Amir Goldstein
2018-10-19 16:14 ` Amir Goldstein
2018-10-19 17:44 ` Matthew Wilcox
2018-10-19 17:58 ` Amir Goldstein
2018-10-19 16:24 ` Olga Kornievskaia
2018-10-19 17:04 ` Olga Kornievskaia
2018-10-20 1:37 ` Steve French
2018-10-19 17:58 ` Matthew Wilcox
2018-10-19 18:47 ` Olga Kornievskaia
2018-10-19 19:06 ` Matthew Wilcox
2018-10-21 13:01 ` Jeff Layton
2018-10-22 18:39 ` Olga Kornievskaia
2018-10-21 14:10 ` Jeff Layton
2018-10-20 4:05 ` Al Viro
2018-10-20 8:54 ` Amir Goldstein
2018-10-22 18:45 ` Olga Kornievskaia
2018-10-22 19:06 ` Matthew Wilcox
2018-10-22 19:34 ` Olga Kornievskaia
2018-10-22 19:48 ` Amir Goldstein
2018-10-22 20:29 ` Matthew Wilcox
2018-10-22 23:39 ` Jeff Layton
2018-10-23 6:05 ` Amir Goldstein
2018-10-23 15:03 ` Olga Kornievskaia
2018-10-23 15:30 ` Olga Kornievskaia
2018-10-23 17:16 ` Olga Kornievskaia
2018-10-24 11:17 ` Jeff Layton
2018-10-24 19:59 ` Olga Kornievskaia
2018-10-25 4:58 ` Amir Goldstein
2018-10-25 15:58 ` Olga Kornievskaia
2018-10-25 16:00 ` Olga Kornievskaia
2018-10-25 16:57 ` Amir Goldstein
2018-10-23 15:39 ` Matthew Wilcox [this message]
2018-10-24 11:32 ` Amir Goldstein
[not found] <20181019152932.32462-1-olga.kornievskaia@gmail.com>
[not found] ` <20181019152932.32462-3-olga.kornievskaia@gmail.com>
2018-10-19 16:14 ` Trond Myklebust
2018-10-19 16:26 ` Olga Kornievskaia
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=20181023153941.GE20085@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=amir73il@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=fweimer@redhat.com \
--cc=hch@lst.de \
--cc=jlayton@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=olga.kornievskaia@gmail.com \
--cc=smfrench@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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).