[nfsv4] Re: question around CB_GETATTR handling
Trond Myklebust <trondmy@hammerspace.com> Wed, 04 September 2024 19:47 UTC
Return-Path: <trondmy@hammerspace.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 A486DC15154F for <nfsv4@ietfa.amsl.com>; Wed, 4 Sep 2024 12:47:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 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, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=hammerspace.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YRDsACOT_uzi for <nfsv4@ietfa.amsl.com>; Wed, 4 Sep 2024 12:47:46 -0700 (PDT)
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2103.outbound.protection.outlook.com [40.107.237.103]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 85297C169416 for <nfsv4@ietf.org>; Wed, 4 Sep 2024 12:47:46 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wCgO0MnnGgzrR67I92g9yiU0x+/pWTP9DYbiP08G6Xof270LfX2JqztJpFge4QO0Tqkuxe0GSx9gI+Gzk6/ckTnVt8nVAEbWEVYEdwv1ldsfJFXjx1ZO6+eY3/PBf/3YFTO3ODNOPYDXZvHx82vhJnTQ6B6jq8dh4h83Ff86B4jokOstpz4m4MGfO8aENixYDFSzD4Yb+euDAdHkwl6/u3dx0UmXUfQkF5ezywD9uSsXu3Pj6Wb2DrgC4sMSx+yKIINnpNVtoWqEqshzyV3wBLXaypWUlnVzqMIkSTaoBTW1q+A+vEqpmKNyiamrblV3bHWNi9ZLUEMRp5/BofQyxg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AiX632G+KPbGMRSq+JXIcWGo7D3p8qd3vAc1y/W9lVY=; b=U1XwrTU52BMyaGynl2HYtNmkX7efU5zYhWuA8rTZiPWNyAhtYfqVBRDRL7skYwU/sUAsG8XUImq5ZOodwYl3Pn6388jT/pGyurlqk3VsZMUes0ZGw1qRZaaj4V48fSUBH3jariU2+cBUE6kcFnHUTVT7YHKwSqvmIVKgE/lYwHo89I/gBtZg0gAicZphcDh/p5P41Bkkqu509GdGJT533aHpLGG2bKrr5kqpmn0grTl0bpKpgPre88xByC5H9oNWULT7E1kNnTK5e7q4E5RLpkiGdbVS5mqtQ3+Os1FFMsl74Jc1UYgypB8x6cRJ9bhFgyZdmPDmY0br1CSFxx3X3A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hammerspace.com; dmarc=pass action=none header.from=hammerspace.com; dkim=pass header.d=hammerspace.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hammerspace.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AiX632G+KPbGMRSq+JXIcWGo7D3p8qd3vAc1y/W9lVY=; b=QolwokXQi4NQE3Ps+viXPjefZ75WqSBLt821WWLTm6oVeS88rDbMh1tsd/f66ZuBSTK1MqkWqHN9pTT9DFQEn/J9Gejfd0txNMrSgY5n575KiKqUo6UfhPZlk6tc953ijVvHbijvzLuIY93FFq5/6sNroilE9Dqb4OtmYthOyCg=
Received: from CH0PR13MB5084.namprd13.prod.outlook.com (2603:10b6:610:111::7) by IA3PR13MB7032.namprd13.prod.outlook.com (2603:10b6:208:537::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Wed, 4 Sep 2024 19:47:43 +0000
Received: from CH0PR13MB5084.namprd13.prod.outlook.com ([fe80::67bb:bacd:2321:1ecb]) by CH0PR13MB5084.namprd13.prod.outlook.com ([fe80::67bb:bacd:2321:1ecb%4]) with mapi id 15.20.7918.024; Wed, 4 Sep 2024 19:47:43 +0000
From: Trond Myklebust <trondmy@hammerspace.com>
To: "jlayton@poochiereds.net" <jlayton@poochiereds.net>, "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] Re: question around CB_GETATTR handling
Thread-Index: AQHa/wNO6CuJwtkOZkO0ScykIXaJFQ==
Date: Wed, 04 Sep 2024 19:47:43 +0000
Message-ID: <2074c10c3de50525f30089fd1634c421b3eddca6.camel@hammerspace.com>
References: <6e6e3d11d0d48c88cc4cefc28b66d9cfb5874723.camel@poochiereds.net> <e584a74b46853af247212e8dc9bee1949c676cea.camel@hammerspace.com> <28b4c2851c73b518023f2e78be53874c64b1cff3.camel@poochiereds.net>
In-Reply-To: <28b4c2851c73b518023f2e78be53874c64b1cff3.camel@poochiereds.net>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=hammerspace.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CH0PR13MB5084:EE_|IA3PR13MB7032:EE_
x-ms-office365-filtering-correlation-id: 69e482fa-6085-4a8f-3718-08dccd1a716f
x-ms-exchange-atpmessageproperties: SA
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|366016|376014|38070700018;
x-microsoft-antispam-message-info: GIa/TDYaMtE2vYUsmI/D3ybRkBxEBfxOVMqMAOOwktImdNMTQeggZFKIE/8C4QJdP/oVsePvI+uwEGydzdWNYY62+cMROnX2CEtY8MTEPzdT0IW3vA5WtRokZC1YMkAf+M3ClGvm+yTLIbU4CNWeElHOlh8Z+z4dpEB1jWj3NGJgf4WZQehMfzpPGWCmEQiljfVYZfuBED0xNBG8XE93xoBr687qNogAXVHlc/wkwJz9lM2c+awzXrKSOjqoHaxCMWjIL6OWOjOog3ZDecsqWSMF1EqEOyI9+odwvO/d1R6afl44Ds3SJCwDR3iPwdoAcAwSWMAjugDLdp480d45oT7W/2PV224bK6OVICZPZGsrpr/2lhGtNPAia1CSdY1jgPRxIx+VPf4P42efU8znMO2kCGpj0MeNLE4ydY4/Puuh+x+0bkST56z9xtqsyW+9eL860UnditMS3oj0WQCXtRgNGE3+UbGC/Q7iD9uhpoGvEXqrdlxDPAevElWVI/wLcHrPO6yY9SQhfE5nbCeEb9a/IV+v+Ag/cQCItu5hm0B1VCuH62J6YJMCbch/J2EmyY+41NTO+1z97X26tYTp2XUiESECgHR8lz5+cfY9pVBP5c0IxWbeeWKnx1psAL6YHM1t7+QDabuUHIGwKN9t3iB90eOy3LRcc6VIIrz5wztVIGaK3NKEJOPSsvj0wXnHvp/Q0gqJxWPgauxMIpqFP1x8i0pREDAXOSyCQIxu1h4mdZFXtmJ/8hsrvCjboJlV3ywNgLccD2/cxcEXR20sut5Ih5T1EX2gmy42Wkm/vhCmwFAVb3noNJLoLupf/57M3OvxLMuSdz8gIgnpWR7de9itWmVIEI+8ivDn/KcQ5clMIgizUJ0/jVe9VkQ1KdjYuxHMRYnTWTqpcSP3pYXbl5oqZs2ztrS4ZGtdOL68oZ2vL5VbYopws20BrV6y1JF7C4WEGN5XwWFwArtjfq1qvwf9eYyxdYbXM5acUZJ6kEOOwyZF6j97+JdGCiEgG9yHueyNyuu3Q025Agl6yPCorUn0FeqZVOF7T5Br/hg8Idjb/4U4qTkTknBD4BFzLXGRw6paveRR3GhbDg8d/ZRDmod8rKcmxJj++gBkZvm6QwSLx4KCQmpNAbJGJSPBBTG7NDwTtDrhbZOBhBtG7u+0TfsRUXJv4zjh7DFeIvciasUNc8vtos6AwSF5mASgYeivBqlgGEi6aZQIbL26KVrMvG7DMoTDVQV3Vs/Ta9NP8zkxNjJz4458qMPU58ajdSCULvWewso5J7HMs4NlruuG1aWBunBKL1qC5o30K+o10GEqF0UWE+zclQRi2ielLa9bvzaJ5w6RFO7dfT4KMuV1Zjcj7kBZ1v0GSrNaFwF/LMlWUgTJHXD4wJKTK7csWkS89+pE9JgzZj1a7p16IxkoUA==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR13MB5084.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: xPfHsUb+J/z/CSAk0xZQgr7yWx9/zPl1EGiDIqtrLNfujRkl8m80OOlxUEiyv81r+saFE02Dfp+gKnNEPDbPO6PTWmMEw6K5bL20ZDt3qpV08XagJdynXojjjeZ7nZT4T/Fm7bKGKuodJbGQsuzG/hHMPWynG02xuAUQXbxFLMiw94mHFJ091zXOTSSwhv/RN+K6LW4Ei+lSlPIpPqubICYVzS3GEi9zadZEZMelgQPYyynJUBGNMzBrilNw6hH3n4eEj+BBroe0SaM0rCaY+O2CBEUj9V1ZZ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SEUTLTPJG/2sZYJN7MefodfXPvi/CCCYyVS5j/UCIJv8UzZXJppddlW7KSZHPW8TPwHJZEY41I2CzcdqHK6LINIFGeAXvoNE6vHrVBeJb34uvq+difAIRMUiE6+0xv8XdiSX0QMvjCBbgHff1qcvjdd34iu/Y6eHaemzlw8AQH7vMfDmFLzIRPmYnAOqHbisxM7PXpT7qJt65YyUBh8TRqtygoJxBx00/2zyBZ/ZCk59vkDzCDtcQfGw==
Content-Type: text/plain; charset="utf-8"
Content-ID: <2D971C6502B9EB4DAA9234400A7826C4@namprd13.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: hammerspace.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH0PR13MB5084.namprd13.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 69e482fa-6085-4a8f-3718-08dccd1a716f
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2024 19:47:43.5646 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 0d4fed5c-3a70-46fe-9430-ece41741f59e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 2vUpCYBYJhy0zQUGrk3vt5yeRfoeqY8RgHo8qMcNLtqVbX6p8NxIwousI/g2tjVq29mwpDGU1rjW6BjjI70w1A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR13MB7032
Message-ID-Hash: WGASEALON52JASALLEK24TXQ3GPMP6HW
X-Message-ID-Hash: WGASEALON52JASALLEK24TXQ3GPMP6HW
X-MailFrom: trondmy@hammerspace.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-nfsv4.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [nfsv4] Re: question around CB_GETATTR handling
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/43lwwHMo3OQ5OGkq6IxYdrv6PJI>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Owner: <mailto:nfsv4-owner@ietf.org>
List-Post: <mailto:nfsv4@ietf.org>
List-Subscribe: <mailto:nfsv4-join@ietf.org>
List-Unsubscribe: <mailto:nfsv4-leave@ietf.org>
On Wed, 2024-09-04 at 15:33 -0400, Jeff Layton wrote: > On Wed, 2024-09-04 at 19:21 +0000, Trond Myklebust wrote: > > On Wed, 2024-09-04 at 12:23 -0400, Jeff Layton wrote: > > > RFC 8881, section 10.4.3 has this pseudo code to describe how to > > > handle > > > the size and change attr: > > > > > > ------------------8<------------------- > > > if (!modified) { > > > do CB_GETATTR for change and size; > > > > > > if (cc != sc) > > > modified = TRUE; > > > } else { > > > do CB_GETATTR for size; > > > } > > > > > > if (modified) { > > > sc = sc + 1; > > > time_modify = time_metadata = current_time; > > > update sc, time_modify, time_metadata into file's > > > metadata; > > > } > > > ------------------8<------------------- > > > > > > > > > The line that shows sc = sc + 1 seems to indicate that we need to > > > increment "sc" on every CB_GETATTR, even if nothing changed since > > > the > > > last time. > > > > > > Is that correct or should we only increment it if it wasn't > > > incremented > > > before? The latter would make more sense, given that it doesn't > > > query > > > for change if the file is already considered to be modified. > > > > I believe RFC5661 says > > > > For simplicity of implementation, the client MAY for each > > CB_GETATTR > > return the same value d. This is true even if, between > > successive > > CB_GETATTR operations, the client again modifies the file's data > > or > > metadata in its cache. The client can return the same value > > because > > the only requirement is that the client be able to indicate to > > the > > server that the client holds modified data. Therefore, the > > value of > > d may always be c + 1. > > > > Which is how the Linux client tries to implement it. > > > > Right, 8881 is similar. Yeah, but nobody has coded to that. > > In this case though, I'm asking about the server-side implementation. > That has its own algorithm (illustrated above in the pseudocode), and > it seems to indicate that once the server detects that the client has > made a single modification to the file, that it needs to increment > "sc" > on every subsequent CB_GETATTR. > > That makes no sense on its face, so I suspect this is a mistake in > the > pseudocode above. Or am I wrong and this is actually necessary? > -- Oh... No, as far as the server is concerned, I think it is indeed supposed to increment the change attribute and timestamps on every reply. That is reinforced here: As discussed earlier in this section, the client MAY return the same cc value on subsequent CB_GETATTR calls, even if the file was modified in the client's cache yet again between successive CB_GETATTR calls. Therefore, the server must assume that the file has been modified yet again, and MUST take care to ensure that the new nsc it constructs and returns is greater than the previous nsc it returned. The spec also says that "committing the constructed attribute values to stable storage is OPTIONAL". That seems misleading or possibly just incorrect. The fact that the client declares that it is caching data doesn't necessarily mean that it will actually manage to write that data back. -- Trond Myklebust Linux NFS client maintainer, Hammerspace trond.myklebust@hammerspace.com
- [nfsv4] question around CB_GETATTR handling Jeff Layton
- [nfsv4] Re: question around CB_GETATTR handling Trond Myklebust
- [nfsv4] Re: question around CB_GETATTR handling Jeff Layton
- [nfsv4] Re: question around CB_GETATTR handling Trond Myklebust
- [nfsv4] Re: question around CB_GETATTR handling Jeff Layton
- [nfsv4] Re: question around CB_GETATTR handling Rick Macklem
- [nfsv4] Re: question around CB_GETATTR handling Rick Macklem
- [nfsv4] Re: question around CB_GETATTR handling Jeff Layton
- [nfsv4] Re: question around CB_GETATTR handling Rick Macklem
- [nfsv4] Re: question around CB_GETATTR handling Jeff Layton