Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5079666pxv; Tue, 6 Jul 2021 17:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIPawvNXxzCR6ZLOZQqvHm3Mi1d5UsoXsGv/oTjy8k2NQ2ozxD1XhfqHIIr+iJoITMcTVb X-Received: by 2002:a05:6e02:1e03:: with SMTP id g3mr16111501ila.248.1625616689919; Tue, 06 Jul 2021 17:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625616689; cv=none; d=google.com; s=arc-20160816; b=UT70FDFaPLzwioNflkwWxzk6mrvWJMZtIHUg9mcFhnudTGe3N3eMF4qw4bQIRW1wf0 NvF48gyxKwI0y91OPVPcxSjJZyOYxWfn9QiSRXr9XioNg5E+TAKDJ27tiUSxjGW41Zw/ Lcgic1YCt8hbD+gde4wtIiqJJaRrmOjNL6KfIe9JWuWH24+JXKylYlbAlCQpad5hOys1 ON8fKtDKRIoG7RNyZJhZ8wHBuT/ae3GItqMMC0FwQyNmEJVXkEDUHxT/+Rtqm4i7A9id j7/Cju3QmWZ5GropznUP5J1Ay0cE07IowDaECfKHZCj5mcZCbJuGwVHSVmkNy/sqVksH WMMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=mlw0DjucBd+mo3nhTbGmRN4m0lAM+3XXrH9VdG9lZQw=; b=Ajxwd9iN8HxJJW3D0m34IecTr8C5GC3kHq/1nsZLvoZskQ4+DYjz0pey/CmzrkJoDH rwvGDcvaDvusg+Jtp8l9kAFzQFg5pJ4imty4UhGUMoeXmVa5fNLqKDElNdYnWIeI4qGm VzBjASNotXZK5HgFWFQYvP6doMPo7F3IYkVHlR8D770qz6n1NLbhDiasLKo4OxB01bm6 IU7WYtwr7zepLqaznZP6JP26MU5vL3pxeqM7RoY7Iysyo5FknSpcSPlm91JHYnXGH/V5 zBiBWfY5jAI4kQyBiZ/dmly0tYNqXYL5KWNujM/L39wUriR9o+9viqnLiwPDrhple0bh ea2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=nlRmERQB; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si18754175ila.86.2021.07.06.17.11.04; Tue, 06 Jul 2021 17:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=nlRmERQB; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbhGGANh (ORCPT + 99 others); Tue, 6 Jul 2021 20:13:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbhGGANh (ORCPT ); Tue, 6 Jul 2021 20:13:37 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E15C061574 for ; Tue, 6 Jul 2021 17:10:57 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id 650B350A1; Tue, 6 Jul 2021 20:10:56 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 650B350A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1625616656; bh=mlw0DjucBd+mo3nhTbGmRN4m0lAM+3XXrH9VdG9lZQw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nlRmERQB3QglSU6XJikAQekD1zhLMzZA81YmSGl0UuoHut1Rb6ZxdE9Ak+0HR41MQ wRIcHz2vuLMFRaFilrfYHQrI7Q9rzBpevyHOoxRtIMH9LObhWJ+g15/h4Q+kPUQ66W 2yV+v/bsB7caGInb99zYeg933O0FqTQ8BhWkRyS0= Date: Tue, 6 Jul 2021 20:10:56 -0400 From: "J. Bruce Fields" To: Dai Ngo 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. Message-ID: <20210707001056.GA26847@fieldses.org> References: <20210521190938.24820-1-dai.ngo@oracle.com> <20210521190938.24820-3-dai.ngo@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210521190938.24820-3-dai.ngo@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 > --- > 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