linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: aglo@umich.edu
Cc: fweimer@redhat.com, kolga@netapp.com,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH v1 2/3] VFS permit cross device vfs_copy_file_range
Date: Fri, 31 Aug 2018 17:56:56 -0500	[thread overview]
Message-ID: <CAH2r5ms+OWdhBu6oU+5p7cWav8ax+eyC4nEBbhLAEzpa_vLXhQ@mail.gmail.com> (raw)
In-Reply-To: <CAN-5tyHa_azgR0hgzv=Jed+Pg7hxH3DUJJHeNH9x4tnzUpzopQ@mail.gmail.com>

On Fri, Aug 31, 2018 at 11:41 AM Olga Kornievskaia <aglo@umich.edu> wrote:
>
> On Fri, Aug 31, 2018 at 12:14 PM Florian Weimer <fweimer@redhat.com> wrote:
> >
> > On 03/02/2017 05:02 PM, Olga Kornievskaia wrote:
> > > Allow nfs_copy_file_range to copy across devices.
> > > NFSv4.2 inter server to server copy always copies across devices, and
> > > NFSv4.2 intra server to server copy can copy across devices on the same
> > > server.
> > >
> > > If a file system's fileoperations copy_file_range operation prohibits
> > > cross-device copies, fall back to do_splice_direct. This is needed for
> > > nfsd_copy_file_range() which is called by the inter server to server
> > > destination server acting as an NFS client, and reading the file from
> > > the source server.
> > >
> > > Signed-off-by: Andy Adamson<andros@netapp.com>
> >
> > What has happened to the patch?  We unwittingly used copy_file_range in
> > the glibc test suite, without realizing that it does not support
> > cross-device copies.
>
> I'm still planning to fight for the patch to be included. As per
> maintainers request, I separated out the async copy patches out and
> hopefully that will be going into 4.20. I'm working on the "inter"
> copy offload functionality which does require this patch. I will start
> submitting and pushing this patch along with the rest of the patches.
>
> Are you interested in the copy_file_range() functionality that does
> support cross-device copies? If so can you tell me how are you using
> it? It would be also helpful to watch for the submission of the patch
> and argue in its favor.

SMB3 clients and server (Windows, Macs, Samba and probably most
every modern NAS out there) support the SMB3 "CopyChunk"
operation used by the Linux client.

I would expect that one of the most useful cases is cross device
For example you have two mounts to your server or server cluster
\\server\share1 is mounted to /mnt1
and
\\server\backup is mounted to /mnt2

and you want to do copy_file or copy_file_range of various
files from /mnt1 to /mnt2

As long as they are both the same file system type, why not
let the file system tell you whether it can do the copy.

Given that this is 10x to 100x faster than the alternative
and this is a common case (and there are many 100s of millions
of SMB3 server capable systems out there which already support
copychunk (and thus would support copy file) - why would we
want to restrict it.

It is much saner to let the file system tell the VFS if it can't
support the cross device copy.

---- and to make it even more obvious why this patch matters ---
Virtualization clients (and various Windows and NetApp server)
support another copy offload mechanism (not just CopyChunk)
ie via ODX which would support cross server not just cross share
copy.    Enabling this would be a BIG incentive for finishing up
ODX copy support in Linux (cifs.ko using SMB3).   This is
fairly widely supported by servers.




-- 
Thanks,

Steve

  reply	other threads:[~2018-09-01  3:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 16:02 [PATCH v1 0/3] VFS changes for NFSv4.2 "inter" server-to-server COPY op Olga Kornievskaia
2017-03-02 16:02 ` [PATCH v1 1/3] fs: Don't copy beyond the end of the file Olga Kornievskaia
2017-03-02 16:58   ` Darrick J. Wong
2017-03-02 18:21     ` Olga Kornievskaia
2017-03-02 18:40       ` Darrick J. Wong
2017-03-07 23:43         ` Christoph Hellwig
2017-03-07 23:46           ` Olga Kornievskaia
2017-03-07 23:50             ` Christoph Hellwig
2017-03-08 15:39               ` Olga Kornievskaia
2017-03-08 15:57                 ` Christoph Hellwig
2017-03-02 16:02 ` [PATCH v1 2/3] VFS permit cross device vfs_copy_file_range Olga Kornievskaia
2017-03-02 16:07   ` Christoph Hellwig
2017-03-02 16:38     ` Olga Kornievskaia
2017-03-07 20:35       ` Olga Kornievskaia
2017-03-15 18:09       ` J. Bruce Fields
2017-03-21 15:50         ` J. Bruce Fields
     [not found]           ` <56CDE406-AE24-40E4-852C-1C47C5CCD37E@netapp.com>
2017-03-21 19:03             ` J. Bruce Fields
2017-03-22 17:16               ` Olga Kornievskaia
2018-08-31 16:13   ` Florian Weimer
2018-08-31 16:25     ` Olga Kornievskaia
2018-08-31 22:56       ` Steve French [this message]
2017-03-02 16:02 ` [PATCH v1 3/3] VFS don't try clone if superblocks are different 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=CAH2r5ms+OWdhBu6oU+5p7cWav8ax+eyC4nEBbhLAEzpa_vLXhQ@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=aglo@umich.edu \
    --cc=fweimer@redhat.com \
    --cc=hch@lst.de \
    --cc=kolga@netapp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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).