All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Dai Ngo <dai.ngo@oracle.com>
Cc: olga.kornievskaia@gmail.com, linux-nfs@vger.kernel.org,
	trondmy@hammerspace.com, chuck.lever@oracle.com
Subject: Re: [PATCH v7 2/2] NFSv4.2: remove restriction of copy size for inter-server copy.
Date: Tue, 6 Jul 2021 20:10:56 -0400	[thread overview]
Message-ID: <20210707001056.GA26847@fieldses.org> (raw)
In-Reply-To: <20210521190938.24820-3-dai.ngo@oracle.com>

Whoops, I overlooked that this is client side, so it needs to go through
Trond or Anna, not me.

Also note:

On Fri, May 21, 2021 at 03:09:38PM -0400, Dai Ngo wrote:
> This patch, relying on the delayed unmount feature, removes this
> restriction since the mount and unmount overhead is now not applicable
> for every inter-server copy.

There's no guarantee that the same kernel version is running on client
and server, or even that the server is a Linux server.

If there's reason to expect that the lower overhead should be more
typical of servers in general, then say that....

--b.

> 
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
> ---
>  fs/nfs/nfs4file.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
> index 441a2fa073c8..b5821ed46994 100644
> --- a/fs/nfs/nfs4file.c
> +++ b/fs/nfs/nfs4file.c
> @@ -158,13 +158,11 @@ static ssize_t __nfs4_copy_file_range(struct file *file_in, loff_t pos_in,
>  		sync = true;
>  retry:
>  	if (!nfs42_files_from_same_server(file_in, file_out)) {
> -		/* for inter copy, if copy size if smaller than 12 RPC
> -		 * payloads, fallback to traditional copy. There are
> -		 * 14 RPCs during an NFSv4.x mount between source/dest
> -		 * servers.
> +		/*
> +		 * for inter copy, if copy size is too small
> +		 * then fallback to generic copy.
>  		 */
> -		if (sync ||
> -			count <= 14 * NFS_SERVER(file_inode(file_in))->rsize)
> +		if (sync)
>  			return -EOPNOTSUPP;
>  		cn_resp = kzalloc(sizeof(struct nfs42_copy_notify_res),
>  				GFP_NOFS);
> -- 
> 2.9.5

  reply	other threads:[~2021-07-07  0:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 19:09 [PATCH v7 0/2] NFSD: delay unmount source's export after inter-server copy completed Dai Ngo
2021-05-21 19:09 ` [PATCH v7 1/2] " Dai Ngo
2021-05-21 19:09 ` [PATCH v7 2/2] NFSv4.2: remove restriction of copy size for inter-server copy Dai Ngo
2021-07-07  0:10   ` J. Bruce Fields [this message]
2021-07-12 17:40     ` Olga Kornievskaia
2021-08-10 18:20       ` Anna Schumaker

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=20210707001056.GA26847@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=olga.kornievskaia@gmail.com \
    --cc=trondmy@hammerspace.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.