From: "J. Bruce Fields" <bfields@fieldses.org>
To: Anna Schumaker <Anna.Schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org, Trond.Myklebust@primarydata.com,
hch@infradead.org
Subject: Re: [PATCH v1 2/3] NFSD: Implement the COPY call
Date: Fri, 4 Dec 2015 12:14:06 -0500 [thread overview]
Message-ID: <20151204171406.GB27725@fieldses.org> (raw)
In-Reply-To: <5661C7C1.9010002@Netapp.com>
On Fri, Dec 04, 2015 at 12:05:05PM -0500, Anna Schumaker wrote:
> On 12/04/2015 11:49 AM, J. Bruce Fields wrote:
> > On Fri, Dec 04, 2015 at 10:49:24AM -0500, Anna Schumaker wrote:
> >> On 12/04/2015 10:45 AM, J. Bruce Fields wrote:
> >>> On Thu, Dec 03, 2015 at 03:55:35PM -0500, Anna Schumaker wrote:
> >>>> @@ -498,6 +499,22 @@ __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp,
> >>>> }
> >>>> #endif
> >>>>
> >>>> +ssize_t nfsd_copy_range(struct file *src, u64 src_pos,
> >>>> + struct file *dst, u64 dst_pos,
> >>>> + u64 count)
> >>>> +{
> >>>> + ssize_t bytes;
> >>>> + u64 limit = 0x10000000;
> >>>
> >>> Why that value? Could I get a comment here?
> >>
> >> Whoops! I had a comment there at one point, but I must have deleted it :(. That value is to cap copies to 256MB.
> >
> > Could you include some justification for the choice of that particular
> > value?
>
> Yeah, I can run tests with different values and include the results in v2.
>
> >
> >>>> + if (count > limit)
> >>>> + count = limit;
> >>>> +
> >>>> + bytes = vfs_copy_file_range(src, src_pos, dst, dst_pos, count, 0);
> >>>
> >>> Sorry, I lost track of the copy discussions: does this only work on
> >>> filesystems with special support, or does it fall back on doing the copy
> >>> by hand? Which filesystems (of the exportable filesystems) support
> >>> this?
> >>
> >> The system call falls back on doing the copy by hand if there is no filesystem acceleration.
> >
> > Is this practical? It means a huge range in possible latency of the
> > single COPY call depending on filesystem.
>
> That's why I'm breaking copies into smaller chunks, rather than doing everything at once.
>
> >
> > I guess I can live with it and we can see if people run into problems in
> > practice. But let's make sure this is documented.
>
> Okay. I'll add documentation about this!
OK, thanks. I think those are my only concerns, good to see that this
is all the new code we need now.--b.
next prev parent reply other threads:[~2015-12-04 17:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 20:55 [PATCH v1 0/4] NFSv4.2: Add support for the COPY operation Anna Schumaker
2015-12-03 20:55 ` [PATCH v1 1/3] NFSD: Pass filehandle to nfs4_preprocess_stateid_op() Anna Schumaker
2015-12-03 20:55 ` [PATCH v1 2/3] NFSD: Implement the COPY call Anna Schumaker
2015-12-04 15:45 ` J. Bruce Fields
2015-12-04 15:49 ` Anna Schumaker
2015-12-04 16:49 ` J. Bruce Fields
2015-12-04 17:05 ` Anna Schumaker
2015-12-04 17:14 ` J. Bruce Fields [this message]
2015-12-07 19:26 ` Christoph Hellwig
2015-12-07 21:03 ` Anna Schumaker
2015-12-03 20:55 ` [PATCH v1 3/3] NFS: Add COPY nfs operation Anna Schumaker
2015-12-07 19:28 ` Christoph Hellwig
2015-12-03 20:55 ` [RFC v1 4/3] vfs_copy_range() test program Anna Schumaker
2015-12-07 19:23 ` [PATCH v1 0/4] NFSv4.2: Add support for the COPY operation Christoph Hellwig
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=20151204171406.GB27725@fieldses.org \
--to=bfields@fieldses.org \
--cc=Anna.Schumaker@netapp.com \
--cc=Trond.Myklebust@primarydata.com \
--cc=hch@infradead.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