Re: [nfsv4] Progressing RFC errata for RFC 5661

Rick Macklem <rmacklem@uoguelph.ca> Thu, 19 September 2019 04:07 UTC

Return-Path: <rmacklem@uoguelph.ca>
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 8CAFB12006F for <nfsv4@ietfa.amsl.com>; Wed, 18 Sep 2019 21:07:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 XLTiJDOJ2dSz for <nfsv4@ietfa.amsl.com>; Wed, 18 Sep 2019 21:07:35 -0700 (PDT)
Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670061.outbound.protection.outlook.com [40.107.67.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F2118120026 for <nfsv4@ietf.org>; Wed, 18 Sep 2019 21:07:34 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bYQQjE69nuZDAcQ8WTTTU8qjDxu211GrTZuDi+mkVypRsE8sVQmBCqjoyod0OcQ2m0eNnHAsjQqFGN20quCMC2rt9wpGNDIj3I8L/Hl0NxJONQj6qte6vIbGF5wsp6h7Qfv1wMru6oZHafUEejG1BVNTllOWYw/E8c9z9OJyxiuzFwC/Xrs/EIfu46GGow39HhLf/CXxlfbqZ5lqVviSTHlE/pkcaCfba3xqjyPF+0Um3EmDwyN73hJgy946GLvWKPXVs6Pt3NguBLvDRSxtJS/RWS+HMH+l1ikoy1JsE2621WWAmqsfl1sr5dgUi3AWkyjeZ5wW1IV/U+fy8n6Sbw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1SKvsQgjWnib3y/nhBRySTCuUO+4xEvVSnyZBQoXS+4=; b=OxZQnHwYy4vUyvJ9+JSCmBADHp73BQBRw3WRzOORT9DAjVjD/ImY6Z7fv8lv1neYe8f1eDBpM/vPv9I9rv8bzoolC+n7T0qCD3ufa5UG545egq0PU9VrMEiimL8yFqUvb0rTV1XDIfFGKoexZG7/DtER9CBBHt0/lNRGFb4+ouUcgmy53xF/XGn2k70/36eKDLyl/KzsKQ+PQddTUqW8XfBl6bsoSDf7mP2BxcgBg6d+R/knaOybDcnHdpCdnPsgIOx+93/bG4h0dQ6XZHdUiKBbWmjGtxRKUIfUHyMlTclWMEJbTbGKg/jzhiWKA80tMOlId9p9Eyhp5G+dE2jDLQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none
Received: from YT1PR01MB3593.CANPRD01.PROD.OUTLOOK.COM (10.255.40.86) by YT1PR01MB3596.CANPRD01.PROD.OUTLOOK.COM (10.255.40.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20; Thu, 19 Sep 2019 04:07:32 +0000
Received: from YT1PR01MB3593.CANPRD01.PROD.OUTLOOK.COM ([fe80::3d91:e96a:3efb:3385]) by YT1PR01MB3593.CANPRD01.PROD.OUTLOOK.COM ([fe80::3d91:e96a:3efb:3385%5]) with mapi id 15.20.2284.009; Thu, 19 Sep 2019 04:07:32 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: Trond Myklebust <trondmy@gmail.com>
CC: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>, Dave Noveck <davenoveck@gmail.com>, Magnus Westerlund <magnus.westerlund@ericsson.com>, NFSv4 <nfsv4@ietf.org>
Thread-Topic: [nfsv4] Progressing RFC errata for RFC 5661
Thread-Index: AQHVbM0EuGFC68ZdA0WMehAxtQCJUqcwwJsEofkpcSPeB7DymYAAQlCAgACGM4Q=
Date: Thu, 19 Sep 2019 04:07:32 +0000
Message-ID: <YT1PR01MB35931DB2A308E81571FFDD38DD890@YT1PR01MB3593.CANPRD01.PROD.OUTLOOK.COM>
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>, <CAABAsM6wB-Jik_RqEHkzy3RrsOhrCx4X=LSxpqWz=PKvVJ7QxA@mail.gmail.com>
In-Reply-To: <CAABAsM6wB-Jik_RqEHkzy3RrsOhrCx4X=LSxpqWz=PKvVJ7QxA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 82e1878c-f2d4-49cd-bbc9-08d73cb6e559
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:YT1PR01MB3596;
x-ms-traffictypediagnostic: YT1PR01MB3596:
x-ms-exchange-purlcount: 3
x-microsoft-antispam-prvs: <YT1PR01MB359649C69841F74D3D151D10DD890@YT1PR01MB3596.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 016572D96D
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(136003)(39860400002)(366004)(189003)(199004)(4326008)(1411001)(76116006)(229853002)(305945005)(8676002)(6506007)(66476007)(64756008)(6436002)(71190400001)(86362001)(66556008)(66446008)(74316002)(786003)(446003)(102836004)(486006)(25786009)(8936002)(186003)(81166006)(478600001)(2906002)(71200400001)(66946007)(11346002)(476003)(46003)(6246003)(14454004)(14444005)(76176011)(33656002)(316002)(7696005)(81156014)(256004)(6306002)(55016002)(99286004)(9686003)(52536014)(5660300002)(6916009)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:YT1PR01MB3596; H:YT1PR01MB3593.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: MmEgD33eqIurvyIbC6LNDNfEBMZ8sd9IGQNFbWlJMzBrGWtRS9100IOCu+YBuxpBIF0WVN4MNUHVtv826nLnM2zJaqedHOy8QVy3iLqMsPzP5kTqNx/lzFf1vwQwsQ9tUJYrBOwnF94/e/cZE9qpU2+hPKLNs8SXS2KuQU3Lb72OvjbcIP9leXSIvSuTgDQEuxqllTVtd3uVI0eH63Tih1pmxWxDF4Cb6FEFOQSTCYaO8oop94kSUpso5kZEFosu9Kn957q3s54SJyqvxE0chgMlnbB2NWtCA95d9W/S7EBAL2p8GIQV1TJBkJuAC53QJRg4wcp4e3MDt1xgd6vT+P5wyUZuHgejRN9y7cbZIy4OGd7RMS+S8acQos7B+gJpw/pSjTbuMMLhpavv/zS8/bBegbixo7zBS3l07RIVMHo=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: uoguelph.ca
X-MS-Exchange-CrossTenant-Network-Message-Id: 82e1878c-f2d4-49cd-bbc9-08d73cb6e559
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2019 04:07:32.4782 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 1KlwUBzaugsljDxpXb86jaPMQnpHLBOqpVNRKuthlusZwEZ9ea2Qucy+QEMtOK+bMGYG83wHwg5rjRrEhAomYw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT1PR01MB3596
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/5-z7PuzVp6X8DermvLKKINNj1fc>
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: Thu, 19 Sep 2019 04:07:37 -0000

Trond Myklebust wrote:
>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
This actually appears to be a discussion related to the offset and length arguments for LayoutCommit, but...
>
>and in a special session of the IETF:
>
>https://mailarchive.ietf.org/arch/msg/nfsv4/Rpw9XCwCARxfaU4ym5L2TauV6ao
Ok. This was long before I got around to implementing it, so I wouldn't have
understood the implications.
--> I would have been interested in hearing the rationale behind not doing
      LayoutCommit for FILE_SYNC4 writes, since it seems to me that RFC-5661
      had gotten it right when it required them.

As I said, the FreeBSD server can handle this case, it just results in a lot of
overhead synchronizing Size, Change, Time_Modify between MDS and DS
whenever a RW layout is issued to a client for the file.

Thanks for pointing this out, rick

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