Re: [nfsv4] Server-side copy question
David Noveck <davenoveck@gmail.com> Thu, 16 February 2017 13:00 UTC
Return-Path: <davenoveck@gmail.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ABB11129495 for <nfsv4@ietfa.amsl.com>; Thu, 16 Feb 2017 05:00:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bGPEDdJXvNU8 for <nfsv4@ietfa.amsl.com>; Thu, 16 Feb 2017 05:00:37 -0800 (PST)
Received: from mail-ot0-x236.google.com (mail-ot0-x236.google.com [IPv6:2607:f8b0:4003:c0f::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 71E82129578 for <nfsv4@ietf.org>; Thu, 16 Feb 2017 05:00:37 -0800 (PST)
Received: by mail-ot0-x236.google.com with SMTP id 73so10415285otj.0 for <nfsv4@ietf.org>; Thu, 16 Feb 2017 05:00:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hnAFCaUmGWI2pmemwQ3oueMzex3lFIyAQwtq92/Y428=; b=sLPr/VvyDXegHLpCgnkOV/nOgF5hFVkTyF+VOs/bcBoix7XMRIuTS5rLPR+fbPN6kk ReNIXsIrmhTu+VWCQ9gn75fnHxP+50Ay9g8EoSNeoddBpjx9svc8431Hv9zn33QqA/KS duKlhW1ny32NTfbKEm3MHBK7azgdp9ctVyHaAbE1KmDvfYeh3bac3omyME0BHbYvgPLM HTZI9UBiIZRCQDxQNFkJiJ+IGCM5OQhnEnl5ZYy7r2Nlio1gPjSJcsfcf1zh6bDnHEj+ QeGndkqNxVq7YssqdEnyjjnANrTZS2heuuTEwqWC5nny9NY+MdKoC2T25rxyuQdqNsDd wMCw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hnAFCaUmGWI2pmemwQ3oueMzex3lFIyAQwtq92/Y428=; b=uHxBsGSl49gvm4T4XhvUAeIT+Xe4kOCBBI3xT+pYTRammfodhP5tPe52Uxea0J/zac mxFwKUqKO8ZKgbrixa/OBCAACo11G9ho8RKGsmWVNu7ycHytJG4ebsH1frCmeKtWGz1+ VTprWGuIHYvW9dtJwyQCaTnLEfMyvAXzrW9YldeviFBGQlKCuLAtIGhp4WmwtIhsuQSB 7AkvDpddlpq78ECKf9eOLTF2P/I+4rQBVDLpE7tVSp4gcD1UTXbgRZ+c/uEvUkk4E5qg jmtpUtvzv9uqW4mKkpTCHPlnhF19YL9zvQIYbZtHXZU22CTP053reBRbpEYPINTBMFen Rpfg==
X-Gm-Message-State: AMke39nkM4VrBLNXQ/oxxzc9n10wH0yjCIctmkEY8jcFF5cemI8hC7cdYNxM179S3e06sDSoKC+XUOguppJJzw==
X-Received: by 10.157.19.93 with SMTP id q29mr1228057otq.60.1487250036689; Thu, 16 Feb 2017 05:00:36 -0800 (PST)
MIME-Version: 1.0
Received: by 10.182.137.200 with HTTP; Thu, 16 Feb 2017 05:00:36 -0800 (PST)
In-Reply-To: <B65A07BE-E379-4507-A9B8-6927DF61A0A5@netapp.com>
References: <B65A07BE-E379-4507-A9B8-6927DF61A0A5@netapp.com>
From: David Noveck <davenoveck@gmail.com>
Date: Thu, 16 Feb 2017 08:00:36 -0500
Message-ID: <CADaq8jdhK2NbJrAa0UHacvBS1w0ucoVpc1LJA3=mxH+_iBfMPQ@mail.gmail.com>
To: "Mora, Jorge" <Jorge.Mora@netapp.com>
Content-Type: multipart/alternative; boundary="001a11351ea42112a50548a562bb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/_vwIARSUSvmOgy9butldMP7fqAc>
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Subject: Re: [nfsv4] Server-side copy question
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Feb 2017 13:00:40 -0000
> The NFSv4.2 spec (RFC 7862) on section 15.2.3 (COPY description) says the following: > If the source offset or the source offset plus count is greater than > the size of the source file, the operation MUST fail with > NFS4ERR_INVAL. > I can understand failing with NFS4ERR_INVAL when the source offset is beyond the end of the file, > but do you think failing with NFS4ERR_INVAL is too strict when the source offset plus the count is beyond the end of the file? Yes. > What is the rationalization for failing on this specific instance? I don't know of any. > Why not return a short copy instead? If the question is "why not actually implement a server to return a short copy", you could probably do that and get way with it but it is generally better to follow the spec, even if mistaken, unless something horrendous would occur by following it. If the question is "why doesn't the spec allow you to return a short copy?", I don't know. I think this is probably just a mistake that wasn't caught in time. If the question is "why can't the spec be fixed to allow return of a short copy?", it can, in theory, but it is probably not worth the effort. You can file an erratta, but since this is asking for a change in behavior, there will be a lot of resistance, especially since the word "MUST" is used. BTW, the word "MUST" probably shouldn't be there since RFC 2119 says: Imperatives of the type defined in this memo must be used with care and sparingly. In particular, they MUST only be used where it is actually required for interoperation or to limit behavior which has potential for causing harm (e.g., limiting retransmisssions) > As of right now, the implementation on the Linux server adheres to the spec but copy_file_range succeeds > when it is called against the local file system, NFSv4.x or NFSv3. > For the local file system, NFSv4.x or NFSv3 copy_file_range falls back to regular copy by > reading from the source file and then writing to the destination file but I do believe the > syscall should be consistent regardless of the underlying file system. I agree but think that the most expedient way of addressing this problem is in the Linux client, It can check against the file size before issuing the COPY request to prevent an erroneous INVAL error being returned. On Wed, Feb 15, 2017 at 5:19 PM, Mora, Jorge <Jorge.Mora@netapp.com> wrote: > Hello, > > > > The NFSv4.2 spec (RFC 7862) on section 15.2.3 (COPY description) says the > following: > > > > If the source offset or the source offset plus count is greater than > > the size of the source file, the operation MUST fail with > > NFS4ERR_INVAL. > > > > I can understand failing with NFS4ERR_INVAL when the source offset is > beyond the end of the file, > > but do you think failing with NFS4ERR_INVAL is too strict when the source > offset plus the count is beyond the end of the file? > > What is the rationalization for failing on this specific instance? > > Why not return a short copy instead? > > > > As of right now, the implementation on the Linux server adheres to the > spec but copy_file_range succeeds > > when it is called against the local file system, NFSv4.x or NFSv3. > > For the local file system, NFSv4.x or NFSv3 copy_file_range falls back to > regular copy by > > reading from the source file and then writing to the destination file but > I do believe the > > syscall should be consistent regardless of the underlying file system. > > > > > > --Jorge > > _______________________________________________ > nfsv4 mailing list > nfsv4@ietf.org > https://www.ietf.org/mailman/listinfo/nfsv4 > >
- [nfsv4] Server-side copy question Mora, Jorge
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Thomas Haynes
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Trond Myklebust
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Trond Myklebust
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Adamson, Andy
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Olga Kornievskaia
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question J. Bruce Fields
- Re: [nfsv4] Server-side copy question David Noveck
- Re: [nfsv4] Server-side copy question Olga Kornievskaia