[nfsv4] Re: question about delegated timestamps (delstid draft)

Thomas Haynes <loghyr@gmail.com> Tue, 10 September 2024 16:02 UTC

Return-Path: <loghyr@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 5C71EC14F6B0; Tue, 10 Sep 2024 09:02:27 -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, FREEMAIL_FROM=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] 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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eyWowF1610Gm; Tue, 10 Sep 2024 09:02:26 -0700 (PDT)
Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4EE3C14F680; Tue, 10 Sep 2024 09:02:26 -0700 (PDT)
Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2068acc8a4fso54610255ad.1; Tue, 10 Sep 2024 09:02:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725984146; x=1726588946; darn=ietf.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EqW7cpEordjk+z3c0XV9jABhfJ/JRMfUyOvhFlinuSI=; b=G1mRQBDbICcfhMFQk5W9+wMH/h1zyiZ5hKu+29HXoWxwjbn5JfNR+yL/XKPojSanmG V9LDlSq1h87tHxZa5DKtV5iCjzn95knrk2c+cr81GDqT4YFD3NKcGhFYT4arJCsShnrX zh3TgWuYe4RSZoNBR8W/1bZTnw6QNXHw0bAnBXr9jh1I4huuf2JesPD/8FQ4+/C5zf5q v1UO9dS7DYJsp9gTJHMQzcZcE4axSOagSrpBczPbumzPZOIl31/APpiqCSP6x7byYsNr 4RKSx+iPqSHpPeshbapPQYpdJrercRLJQj8PxzOGIKaqFKPsSq6yOkCqoKxFYOpnR80w zdaw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725984146; x=1726588946; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EqW7cpEordjk+z3c0XV9jABhfJ/JRMfUyOvhFlinuSI=; b=mrGVg6nSyzTirkJA3y+pJmy8PIJHpe+1ZXn+Fz7ZUCov4fvS6GPIxHlK4Z93H+5FyA 2TbFjka+wWJkeQkS9+96/mC851qosfY6FSWQj8UVUq/3rp4wJhBKT/pvUJJvGKIKz95a mxFS1+APfn2sDz2CifLCQsu81IaqXvlL8nUqI6qLcxp5kp7QBhlIs1pGtRYHebnEYpVU Iabs6qZAUXPnuY1/l/lBdak68gDgzOXE8j1P/2z58iPYOu6Xb3uKgL5c0KE3vrlO3qxG lZIgwwrqmyL9fF+YvCjK46KZ/2j2jU6cKWfWvjwcVgXOOVbbcTycMqUGtbrK4dTIUln7 u9qQ==
X-Forwarded-Encrypted: i=1; AJvYcCU0pRSwz42dNYuTZrx/6cS2jbQZ7H4vVTbB+nrJm9c37G2zk2pUtdGMdykX2Ogd+L9jpZ639g==@ietf.org
X-Gm-Message-State: AOJu0YyJjORkOCtUdIFZqW7sXS7qDXmhBAlp7QGJvN/6ZvkePz2FTp54 Fn9E0zvVUCDH4yjLqtJuaIw7TpGAy+MrqziDA/IglxNL6+TnARA4F4avkA==
X-Google-Smtp-Source: AGHT+IHFrcfFgF26MhudFSMN6nnL5m2S1u8UY8MnN6tGoAq3VW6RiD093+86PZvp8Ftsa03z5aXwxA==
X-Received: by 2002:a17:902:f543:b0:206:a574:b4fd with SMTP id d9443c01a7336-2074c4afe09mr16172035ad.9.1725984145857; Tue, 10 Sep 2024 09:02:25 -0700 (PDT)
Received: from smtpclient.apple (c-73-222-0-248.hsd1.ca.comcast.net. [73.222.0.248]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710e3248asm49989625ad.71.2024.09.10.09.02.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Sep 2024 09:02:25 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\))
From: Thomas Haynes <loghyr@gmail.com>
In-Reply-To: <cef9752f814b692c82b1a0eafeb453ca615c0f00.camel@poochiereds.net>
Date: Tue, 10 Sep 2024 09:02:12 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <89B7F076-719F-4701-806E-C533EC6AFA9F@gmail.com>
References: <0fc24e8a75423febc31cf373db995deb99b47a7b.camel@poochiereds.net> <F784F7B7-AECE-40BE-97EE-17D5F8BB22CC@gmail.com> <cef9752f814b692c82b1a0eafeb453ca615c0f00.camel@poochiereds.net>
To: Jeff Layton <jlayton@poochiereds.net>
X-Mailer: Apple Mail (2.3776.700.51)
Message-ID-Hash: RZN635GTA2LA7JBGXBP5MNLNF7ATER6H
X-Message-ID-Hash: RZN635GTA2LA7JBGXBP5MNLNF7ATER6H
X-MailFrom: loghyr@gmail.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
CC: draft-ietf-nfsv4-delstid.all@ietf.org, NFSv4 <nfsv4@ietf.org>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [nfsv4] Re: question about delegated timestamps (delstid draft)
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/67U2vc2iaYK6CJsleUVtSzQeyCc>
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 Aug 29, 2024, at 5:42 AM, Jeff Layton <jlayton@poochiereds.net> wrote:
> 
> On Wed, 2024-08-28 at 15:34 -0700, Thomas Haynes wrote:
>> 
>>> On Aug 28, 2024, at 10:13 AM, Jeff Layton <jlayton@poochiereds.net> wrote:
>>> 
>>> The draft says mentions this:
>>> 
>>>  Further, when it gets a SETATTR in the same compound as the
>>>  DELEGRETURN, then it MUST accept those fattr4_time_deleg_access
>>>  attribute and fattr4_time_deleg_modify attribute changes and derive
>>>  the change time or reject the changes with NFS4ERR_DELAY (see
>>>  Section 15.1.1.3 of [RFC8881]).
>>> 
>>> Presumably, the SETATTR will precede the DELEGRETURN in the compound,
>>> in which case (at least under Linux kernel server) we will not have
>>> vetted the DELEGRETURN stateid yet.
>>> 
>>> The simplest fix might be to just have it accept SETATTR for the
>>> delegated atime and mtime iff the client is the owner of the write
>>> delegation.
>>> -- 
>>> Jeff Layton <jlayton@poochiereds.net>
>> 
>> 
>> Looking at the HS implementation, we do just that, we accept it if the client is the owner of the WRITE delegation.
>> 
>> I.e., we do not insist that there is a DELEGRETURN.
> 
> Thanks for confirming it. Maybe we should update the draft along those

> lines too? Have it say that the SETATTR that sends these new attrs must
> contain a WRITE delegation stateid, and drop the language about having
> a DELEGRETURN in the compound?
> 
> -- 
> Jeff Layton <jlayton@poochiereds.net>


Hey Jeff,

Work interfered, so just now getting back to this.

The next paragraph in the draft states:

   These new attributes are invalid to be used with GETATTR, VERIFY, and
   NVERIFY and can only be used with CB_GETATTR and SETATTR by a client
   holding an appropriate delegation.  The SETATTR SHOULD either be in a
   separate compound before the one containing the DELEGRETURN or when
    in the same compound, as an operation before the DELEGRETURN.
   Failure to properly sequence the operations may lead to race
   conditions.
 
Why can’t it send a SETATTR in the same compound as the DELEGRETURN?

I guess I would rewrite the paragraph you quote as simply:

   Further, when it gets a SETATTR with those attributes being set, then it MUST accept those fattr4_time_deleg_access
   attribute and fattr4_time_deleg_modify attribute changes and derive
   the change time or reject the changes with NFS4ERR_DELAY (see
   Section 15.1.1.3 of [RFC8881]).

I.e., for me the emphasis is on what to do when it encounters a SETATTR with the attributes and when the SETATTR can appear.

Thanks,
Tom