Re: [nfsv4] persistent sessions and compound atomicity

Rick Macklem <rmacklem@uoguelph.ca> Fri, 11 December 2020 16:20 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 7DA663A0CF2 for <nfsv4@ietfa.amsl.com>; Fri, 11 Dec 2020 08:20:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-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=uoguelph.ca
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 MiZpxgZCFwWX for <nfsv4@ietfa.amsl.com>; Fri, 11 Dec 2020 08:20:12 -0800 (PST)
Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660071.outbound.protection.outlook.com [40.107.66.71]) (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 5B18F3A0D84 for <nfsv4@ietf.org>; Fri, 11 Dec 2020 08:20:11 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Br/VXXjYTuL0bbTufcLoBQTNasy8xeuLxf8qtF0pxgMQ8xhiMmWMHoI4LXVxQgSfGEUX+knbRn4V/z5gRJOtDJ9UWj/YObhKtdCAyAQn56DbCauHHKIFIeSZBNMGkyBcM8mgXxngLsBD+Gzj1Y5sWpnvzfngTIjMaFz6AgAtU6Y9idLFJiTSQMocyAF1IxwqJ1YC71mebavvbKnXc53xv7Rw44kGN85wz2MOlJhl5xImQJRa3YnS+1uiM8VCSRDnUsiO67OzQ/mgCElyPPULHiWf2fIEM/V54xt5/mbKiYqVe2DG28t7Idh64EwH8TwF1oM2tbDztI1YU9wPk9fm8Q==
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=9uzCw0ZZCD7Vvdn+8gZwc3iCq9XGPjIA/R7j3gqUm1Y=; b=WAP0YMZs0mtooDieTXp7hsBK08nm6oNL4xhVhG2GelnCHmI/qRg6V2P7OAfr30i16PrBlfaMX+/kAR9X71xNJqY0Wu26ObDGtXHS8jDpS+KyUmVu1TZBFHkaSxAz3rCQEBbINbVAO7oEZ+JYzPe2e9BtxZXq86ICvd0eMeo3NGLV3b6IPz2jsk29JDVnrulBW4j6nhJpOVW7kdOjWdgvWgPM8m6Z5z8WjEn9xziO4Klp9jHV5qTGp6mQoLGJiCEPr9AP5toYH1Ahw5z9Ifvvx48tLA8KcD7CVWBsmDMoYbQtE5LBhtYPKrppDDOmDrp2lYtY21vWK7hr8kXaVgi0iw==
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
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9uzCw0ZZCD7Vvdn+8gZwc3iCq9XGPjIA/R7j3gqUm1Y=; b=TO0XT9bSMggma0wWLTzXEfsnM8zR6tdj/lQjByDcD+7kBAkmL7ZK35wgQDNyBlypCiIiOu2Ayt2dk50v6s0ueCU/fEqxJ30C0PkAd0W8ihGK43zpcZbUr9aaUA2OyNbjsGf1YwNtXBJtPhngLTw0V0Dx7vIYkZXstBni+VN1G7aGZwoXJfTVB6RdtAec01eX4BJGXl7dFHevoFt75ngI9KWThwg8++/WQX9lcFbsq64zGJgfGyBKFEjehWKE9ikLooReoglQ3j8+BI3wy0l7zP1z7hBQBlWJBUupDd/zsXU0FgIOToxkSBUVoaidcB/yak8BKMMjbR3UBNYrkmCdQg==
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQBPR0101MB1764.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.17; Fri, 11 Dec 2020 16:20:09 +0000
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::7d6b:aa68:78f4:5d94]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::7d6b:aa68:78f4:5d94%6]) with mapi id 15.20.3632.027; Fri, 11 Dec 2020 16:20:09 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: David Noveck <davenoveck@gmail.com>, "J. Bruce Fields" <bfields@fieldses.org>
CC: Tom Talpey <tom@talpey.com>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] persistent sessions and compound atomicity
Thread-Index: AQHWzjLkcN/xKABU9ku/9AZTu24qZ6nu2JaAgAALKICAABB6ToAB8SQmgAErG3I=
Date: Fri, 11 Dec 2020 16:20:09 +0000
Message-ID: <YQXPR0101MB0968F6BE8C99A7D97494BA50DDCA0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
References: <20201209002639.GC16661@fieldses.org> <93d4e52e-23e6-cf5f-4b0f-50060f4c6151@talpey.com> <20201209144927.GB23889@fieldses.org> <2d94c517-04ba-75b0-9583-4b7eb4aa8ced@talpey.com> <YQXPR0101MB096883BD0B2EBF66D12FC732DDCC0@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <20201209225944.GC24283@fieldses.org>, <CADaq8jdYyigfkHDbAdk7uARzdSsoNHdPZdUJjPMka5_4tZ6C6Q@mail.gmail.com>
In-Reply-To: <CADaq8jdYyigfkHDbAdk7uARzdSsoNHdPZdUJjPMka5_4tZ6C6Q@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=uoguelph.ca;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 4e53acde-ae74-4505-0675-08d89df0a129
x-ms-traffictypediagnostic: YQBPR0101MB1764:
x-microsoft-antispam-prvs: <YQBPR0101MB1764363DC9488B0849BCDB45DDCA0@YQBPR0101MB1764.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: QqYlwqYmFBvNkL315YAYho58BDYQzkqrtTCEG0HuxUylMFXi5gxytdXvGgmw5M4IsrYP6rc8g2kYSWR2yZRsfyBlVbS4hq09mMZlceweqkHjXYWicZ0Wpndmu6Hfo8WtxiBsUiPb74iUlKcrwIflrS2bITqPVEeh4pW7+uplH5FWw73naVOzqoaUIsoBg9Sq82yft2vmwckthnzsp7MmGVJaJRpM6BeBXsXEQEsJhW6gq5WtK7MOxChpM0cRbO5Z10i3EE0X7KlfBNRYA19yPJniuo78z2qjksny5yL3kLOFxx3EZixd1+ZRFJNSjyQfBZHBrT2FHOq7IE+EZKuOAV48Ad9y8Bu/9iNsaZb7Gf8wOND9itCZEYcArHMngMjVuJme11ztMBYYYOkF69rRVw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(346002)(366004)(376002)(136003)(4326008)(76116006)(55016002)(6506007)(33656002)(508600001)(110136005)(54906003)(786003)(66946007)(66556008)(64756008)(66476007)(52536014)(7696005)(966005)(8676002)(66446008)(86362001)(71200400001)(2906002)(8936002)(5660300002)(9686003)(91956017)(186003); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: 3qEhq7eNrP0dPb14RJZ1RrV9Nq6hB0r17cXZiL6mUlvavJZfBZ6ywXnrEZO+o3kU6tqIPkw+fvVxkmXAm/34ZOIz7cJco/zQEeb0lIdFCEE5o1ccmDBYtuYDMRzH22ZGoO5Pp0j5y3boytmw5yIlwWmNFrppz0418IAhgov4y6qBjIXMvW8ySQbRVlairNZ/ZC4jDs8OMsx2lNVP/jXZVxNG16+qPZcjdXrwnskn0RFpKerNezl8EjTvqWaOZrvIhhNM21Q+9fZ5F9U7EEuqPlie9ixqAlJBC7bQpR6+mbOPmD6qJ806Oym8/bq8su2SLZUtaMZ2nbsL9J/C21cqeeCSwkbPus4FsP7vn+pEZgvICAY3YuNaGEnHZCKtnW1FXtUleS8TtUB58kUeHnNmF4anv/P92gv9Sw00c8CVfcbQIa+PppY2U9l48O5AHF07PtbpEvoE3wjERCEJ9MjrjupX2gznY0pNu+NGRR7ZBrK5PIo6yJ/ALTPsi1GhrWs2skjvyci5e1j64hIivCXhMrAfxI3pvyJkIz/2L8BF1f0wmJDuLwuUrrMMqnTyacUMl7s/LveteHTPhhbDGus6KUG+ksLZB++ioyA6MdX1GvxAu8oV/sZkJ5yRi47L0fSUXkMiEoJI4Y+5muBmMBbf5yoRFuNGLQjreVdncHrcrlxwrJUbdY5rUbkxJURFmZMDcMJTkVK2cJBmlUA5k3aXaEnx2yQsu9CUgWEqzmFT20ikX2OnFtT247lQfYXOwazSU8ikSmVCewcM1ncl66wyCjkKJt1bD7F86SulfpXE/JzgoZyAqR4dTTnTg7Yg2Zi+AdX6R/ibCKUkGF2u+RiPZwVLXOtTsQV29yl1pTyHkeU6OIRtGTDpO5v8hjY1rmtKWdYh/JLOgl3omNOlcJCghCZLIJKRiVOFYTNs9lhutOz/AVtOTWsD4YjztgQEXjEqZMQj5/VJsuKuiyH93IjfNrarYIHfw6PVTF7v5uDwk47Tl/ZJRfs6t/ba5qqxUkm+iY5R29DDPp2fV1No7awPeqRow/V3zG0MuR1aMeBYod0=
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-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 4e53acde-ae74-4505-0675-08d89df0a129
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2020 16:20:09.3807 (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: nX+iZ4zH1FNt7C8m+3H3fy1NeI9oKf1gHGIn4Ogp0XHVoZykF5JEiHDTSyBGuIu4QoGsYxu2OU9kEgjhQ/2NiA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1764
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/-qAOTz_UxwumP9kg2epAPl5jZzs>
Subject: Re: [nfsv4] persistent sessions and compound atomicity
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: Fri, 11 Dec 2020 16:20:15 -0000

David Noveck wrote:
>On Wed, Dec 09, 2020 at 04:43:59PM +0000, Rick Macklem wrote:
>> I would say that the ATOMIC refers to the individual operations of the
>> compound. In other words, it must cache the reply to each operation
>> when it is completed, in the persistent cache.
>>
>> Then, if a retry of the compound is received after a server reboot,
>> the reply for the first K operations that were completed prior to the
>> reboot are generated from the cache and the remaining N-K are
>> performed on the file system to complete the reply. (At least for the
>> non-idempotent operations in the compound.)
>>
>> For this to all work correctly, I think the server file system would
>> need to perform each non-idempotent operation ATOMICALLY as well, such
>> that after the reboot the file system is in either the pre-operation
>> or post-operation state.
[stuff snipped]
>I don't see the need for individual ops to be atomic especially since they (e.g. >writes) are not defined as atomic in general.
Well, I'd actually say that "write" is not a non-idempotent operation for this
case. Long ago, Chet Juszczak defined it as one in his original paper on the
DRC he had invented, because interactions between "write" retries and other
non-idempotent RPCs could result in inconsistent results. (He also coined
the (mis)use of the term in his paper to refer tp RPCs that could result in
inconsistent outcomes due to retries.)

However, since sessions allow a client to serialize RPCs (same session  slot)
and operations within a compound are assumed to be serialized,
I think allowing retries of partially completed writes will be ok for 4.1/4.2.

However, if the operation is an exclusive open create, I think the server
will need to either complete the operation and capture the reply for the
persistent session or roll the file system back to the pre-exclusive create open
state to get things completely correct.

rick

I don't think we have total agreement but we are moving in the same direction.  No reason to be anything but calm.
.

> rick, who has no intention of ever trying to implement a persistent
> session cache.

Your input is still valuable.


I can't decide.  It looks like kind of a pain.  It'll require some
cooperation with the filesystem folks--I think it needs to be integrated
with filesystem journaling somehow.

That makes sense.


But I'm not looking forward to someone running into this, and having to
say, "oh yeah, we've known about that bug for decades; just give me
another few months or a year, and I'll fix it right up for you...."

I have a revised version of this section in draft-dnoveck-rfc5661bis-00.  (Will be out before next year).  I hope we will discuss that and get to a text that everybody does agree on, and might even be implementable :-)

--b.

_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org<mailto:nfsv4@ietf.org>
https://www.ietf.org/mailman/listinfo/nfsv4