Re: [nfsv4] Progressing RFC errata for RFC 5661

Trond Myklebust <trondmy@gmail.com> Wed, 18 September 2019 19:58 UTC

Return-Path: <trondmy@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 B5FA7120CA3 for <nfsv4@ietfa.amsl.com>; Wed, 18 Sep 2019 12:58:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 kF4LfAVLDMFx for <nfsv4@ietfa.amsl.com>; Wed, 18 Sep 2019 12:58:47 -0700 (PDT)
Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (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 69FE3120CA0 for <nfsv4@ietf.org>; Wed, 18 Sep 2019 12:58:47 -0700 (PDT)
Received: by mail-io1-xd42.google.com with SMTP id b19so2168796iob.4 for <nfsv4@ietf.org>; Wed, 18 Sep 2019 12:58:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1GyqC5GpgN8h87z2ElfAiARdLTKoQPWJxZzMKWMM4ms=; b=LcV568WxXy2IIyy87ZeJ7tJrkwg/DffncBRvWbsCekTQXHxDurM71OYR7Pc+idV517 BBpA3zKn5Tx8DSVfGGYPtlXbk13Wfvmi7+LUhSyFDSRpNZHCq1s9cMEl9xsSwh1aJafF XkVHbeKfpZi3wYs27sMz++iGFCcWLV3bCwHsO0oaenYVQ2WN83GBlVMeanJWYCQYnstX nJGbmZbVDJ04Co+Zsck7MnkiZ2znAEsSv/HYc6MJ8yvu+ExwdEbsCumfNqRweP4J25Kl R+l36fh0GQGK1r3lR7NW8vxuHYTnl0rXm8tLETOP3Q9SlqqpbZb/ZaJ4uxcr65ALHRWq HFgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1GyqC5GpgN8h87z2ElfAiARdLTKoQPWJxZzMKWMM4ms=; b=UaEc/uDuJIfy6ShLlDKIBJMw0bCLA55OuTp8luKThpHm/phuHkSKp9/pDnNLBgbhwH TB09JL+4kp50N+t57e2Autpf0k4qWx/UUCNEmoqsRkWXfB0250Kuclmhhq2wZH+4ugfQ FvT7zKBQ5LyG/JHdqIiFWf5+iVYalNkhQnlI7M6B7njmJiMenbhi8QxCbs3DrO4aBy6u 9hYxdJoijnrLIwToSJir6olTjxjZeQBIqWnq+RhXgK3qy/3JDceHgn66ijvxD54Bwx1J HSXeQTRLGCfAIY6gPpoyAnwUDq1kCyhiqcomZFo0f2M27cfr/W3dl01P9HW+Wtq3rHYI 5Xwg==
X-Gm-Message-State: APjAAAVXsM7ZpKCccthh6kJQdsUy02gOoKqWXkcBg6CmVjNSnlQBRSxE IhBnzf4cxO6lRxaqxMNLRv6OxaSEnWRWLVyVxw==
X-Google-Smtp-Source: APXvYqzb8TW64GWEEuiTJEDdDhQF5oTESIjz/jzj4KJNMivYzKpbyy1gquPLMgzl+PazZZf2pcreX9GqJn5Q6czh0S8=
X-Received: by 2002:a6b:3705:: with SMTP id e5mr3022721ioa.213.1568836726321; Wed, 18 Sep 2019 12:58:46 -0700 (PDT)
MIME-Version: 1.0
References: <DB7PR07MB5736124B2F507DA20F317BC195B30@DB7PR07MB5736.eurprd07.prod.outlook.com> <CADaq8jd4u-Lwvy_Csu2jqrcGFZ_tLOeSkqKwUW0eivuc=trsBg@mail.gmail.com> <CAABAsM5TDGx0qiMv+Ln4WLOKjuQiTFKr6HD6d9zqD3NfjpvoFg@mail.gmail.com> <YTXPR0101MB2189B0CB69FA090BD1D54F92DD8E0@YTXPR0101MB2189.CANPRD01.PROD.OUTLOOK.COM> <1941956044.30576385.1568804777656.JavaMail.zimbra@desy.de> <YTXPR0101MB21892F5E56B089AC6A255506DD8E0@YTXPR0101MB2189.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <YTXPR0101MB21892F5E56B089AC6A255506DD8E0@YTXPR0101MB2189.CANPRD01.PROD.OUTLOOK.COM>
From: Trond Myklebust <trondmy@gmail.com>
Date: Wed, 18 Sep 2019 15:58:35 -0400
Message-ID: <CAABAsM6wB-Jik_RqEHkzy3RrsOhrCx4X=LSxpqWz=PKvVJ7QxA@mail.gmail.com>
To: Rick Macklem <rmacklem@uoguelph.ca>
Cc: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>, Dave Noveck <davenoveck@gmail.com>, Magnus Westerlund <magnus.westerlund@ericsson.com>, NFSv4 <nfsv4@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/lKN7FE8DzGqlHGXwsioWYg9eS8w>
Subject: Re: [nfsv4] Progressing RFC errata for RFC 5661
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 18 Sep 2019 19:58:50 -0000

Rick,

That errata predates most of the Linux pNFS client implementation. We
wrote the implementation to conform to the errata.

So no. It's not a bug. It's a deliberate design based on a decision
that was discussed in the IETF WG, on the mailing list

https://mailarchive.ietf.org/arch/msg/nfsv4/_KTtO6uz-MvRoStbhPuOXWZr6yI

and in a special session of the IETF:

https://mailarchive.ietf.org/arch/msg/nfsv4/Rpw9XCwCARxfaU4ym5L2TauV6ao


On Wed, 18 Sep 2019 at 12:39, Rick Macklem <rmacklem@uoguelph.ca> wrote:
>
> Mkrtchyan, Tigran wrote:
> [stuff snipped]
> >Hi Rick,
> >
> >here is the public link to errata
> >
> >https://www.rfc-editor.org/errata/eid2751
> >
> >Tigran.
> Thanks Tigran.
>
> Ok, so now that I've read it I have to admit I think it is rewriting the RFC
> to conform with what the Linux client does.
>
> I think this para. from Sec. 13.10 of RFC-5661 is clear:
>    The NFSv4.1 protocol only provides close-to-open file data cache
>    semantics; meaning that when the file is closed, all modified data is
>    written to the server.  When a subsequent OPEN of the file is done,
>    the change attribute is inspected for a difference from a cached
>    value for the change attribute.  For the case above, this means that
>    a LAYOUTCOMMIT will be done at close (along with the data WRITEs) and
>    will update the file's size and change attribute.  Access from
>    another client after that point will result in the appropriate size
>    being returned.
>
> It states "will be done". It doesn't say anything about UNSTABLE4 vs FILE_SYNC4.
> (I think most POSIX-like clients would consider the fsync(2) syscall to require
>  the same treatment as "close" above, but that is a POSIX-specific client issue.)
> I can see the argument that, since there is no "must" in the statement, that a
> client can choose not to do this, but that would also imply that the client will
> need to live with the consequences of it.
>
> I think the second sentence of the first para. of the errata is bogus:
> For file layouts, WRITEs to a Data Server that return a stable_how4 value of
> FILE_SYNC4 guarantee that data and file system metadata are on stable
> storage.  This means that a LAYOUTCOMMIT is not needed in order to make the
> data and metadata visible to the metadata server and other clients.
>
> Why?
> The FILE_SYNC4 was returned by the DS. This would imply the DS
> has committed data and metadata to stable storage on the DS.
> However, I am not aware of anything in RFC-5661 that would imply that
> the Size, Time_Modify and Change attributes or anything else must have
> been updated or in stable storage on the MDS at this time.
>
> If a server does not require LayoutCommit operations for correct behaviour
> then it can simply reply NFS4ERR_NOTSUPP (as I believe the Netapp filer
> does) and the client then no longer needs to do them.
>
> If there is somewhere in RFC-5661 that it is stated that LayoutCommits are
> not required when the DS replies FILE_SYNC4, then I missed it and there
> is a problem with RFC-5661 that needs to be addressed.
>
> Otherwise, sorry, but it seems that the bug is in the Linux client implementation
> and not RFC-5661.
>
> Is there a File Layout pNFS server implementation where the DSs return
> FILE_SYNC4 that will break if the client does a LayoutCommit for this case?
> (If so, then something may need to be done.)
>
> rick
>
>
>