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@xxxxxxxxxx> > --- > 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