[nfsv4] Re: OPEN_XOR_DELEGATION when there is existing OPEN stateid
Rick Macklem <rick.macklem@gmail.com> Thu, 03 October 2024 15:12 UTC
Return-Path: <rick.macklem@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 817B0C14F69A for <nfsv4@ietfa.amsl.com>; Thu, 3 Oct 2024 08:12:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 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_DNSWL_BLOCKED=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 yKTLMo24O3-e for <nfsv4@ietfa.amsl.com>; Thu, 3 Oct 2024 08:12:23 -0700 (PDT)
Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 0D60CC14F5F7 for <nfsv4@ietf.org>; Thu, 3 Oct 2024 08:12:23 -0700 (PDT)
Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5c88b5c375fso1219653a12.3 for <nfsv4@ietf.org>; Thu, 03 Oct 2024 08:12:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727968341; x=1728573141; darn=ietf.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=i33NNObPuyEz4G2UiUwot62S/AdnfUX4bfq/6Twm8q0=; b=JwzpZnSb1obx7RgeGvMYEE0O/h1GwKrxR0YtrnVyExktMmxfamrmVsDUpRkbeUEurq BOWtcVMVHaK3L54/vuxWZF8RnGbm+osrllvjtmpJxIxk5axF5mX2jw7sauXfXiZx0vuk xsRSH3PP//KN2gnBRlcuMRmtjIzRIZ6mD1Y5mgA5tZ6xTbFkMkjNTRYSfZre/av+HShc FwiT0vq4k66WUpeXg4StGCJJfLB+qxunzsBjkALyUDtyChY5IpO4OPfURwWH1JEW+dZ+ eGWdHTTPj0fM6hJ4sAlszH4kthCRqDXc0g9lOU+Vjyo2UkJbmKLYyAN1+rNPLvSDsxTJ jepQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727968341; x=1728573141; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i33NNObPuyEz4G2UiUwot62S/AdnfUX4bfq/6Twm8q0=; b=n4978rdQsW4MBNlnc6XSMrboQuaDA4kL20cr35chq6izXQBnYVIBxzZhOTtx2Ue/8p K/FgqzRuJGlTKM8qRJyDj4mS7xlD2dqqJYau0E4kNaPzfKBNVsDNv+FDdR4rCKUE7o0h r3BOYmoadj4WHnfzEhXMg7N178b9B+3jW8EMq4kWHHUgXlIQYCIR+fv7yuN4GGfNUfXY s89UlEEgd3ijGo9yNBpDiD4j7uTmO7QZV1sSp83W+ILh7buEWqQj26i4Tktp9WPgBve5 u5xc7fhiJYWbRq1aW6RlGvKfLr/Bh/izXp1HoMtw8UMBWyXMhy+Vi6joSLxtgpHYxFWS gv9w==
X-Forwarded-Encrypted: i=1; AJvYcCXcqzsJERLhlz7sQDlUylH5bp7wSES17vpUk66eEJooKZ4qHsboHi4sfqTe8SaIWBnb8/S1eA==@ietf.org
X-Gm-Message-State: AOJu0YyAfnAklGEJT0sEj77zJkSmAGHAE2r4+V02P3K+G+DhTm8tJZA5 hDGEzzmHyoas6UyJjmR7Q3cyxunYV8lrquW+2lnatT2DcEGUK16ppfcdTBbd29PQQzw3L8DvZh/ wjhFTK/9AK89LHcHwi2RvSN8bAZZsjqQ=
X-Google-Smtp-Source: AGHT+IGHslg/XgMNAnS2ZwLVZ4KzVAc8m44wEagk+SMPtvkKUe24G7bUZGwLMImmoREmEo9lKk8NL+h2AS8S/y1wiTA=
X-Received: by 2002:a05:6402:13cf:b0:5c8:9f3d:391b with SMTP id 4fb4d7f45d1cf-5c8b1b728f3mr6457921a12.28.1727968341237; Thu, 03 Oct 2024 08:12:21 -0700 (PDT)
MIME-Version: 1.0
References: <6d1a1371de69d93a682f0c202669c46089033c67.camel@poochiereds.net> <F61478EA-3B05-479D-92FA-486EAC52CF2D@gmail.com> <934dfc20501e03031a010ce52eb97604c2eaa289.camel@poochiereds.net> <D99B6BB8-6676-4F06-A2C5-8D4C47D3E090@gmail.com> <CAM5tNy4K-Kz8maDk9fV+CF0NiPxOxsA325VT2KxOrNMu8GW9Qw@mail.gmail.com> <388f01120834ceb762f6e731885e736639e8f9a6.camel@poochiereds.net> <CAM5tNy7EtV6=jK09zfxihoM=uN9V=k-N+3eMuzCpKu2zbkAqmg@mail.gmail.com>
In-Reply-To: <CAM5tNy7EtV6=jK09zfxihoM=uN9V=k-N+3eMuzCpKu2zbkAqmg@mail.gmail.com>
From: Rick Macklem <rick.macklem@gmail.com>
Date: Thu, 03 Oct 2024 08:12:09 -0700
Message-ID: <CAM5tNy7QaXsTm0dWcViSAiGPACg42DXGLgkJ0Y7eeNom72YR6w@mail.gmail.com>
To: Jeff Layton <jlayton@poochiereds.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: ITGXYZSKPJS4JDRKLIJKTP4OM2PK2JBA
X-Message-ID-Hash: ITGXYZSKPJS4JDRKLIJKTP4OM2PK2JBA
X-MailFrom: rick.macklem@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: NFSv4 <nfsv4@ietf.org>
X-Mailman-Version: 3.3.9rc5
Precedence: list
Subject: [nfsv4] Re: OPEN_XOR_DELEGATION when there is existing OPEN stateid
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/ZWmMxhIMR3jaE7waqQVwTUy8hrY>
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 Thu, Oct 3, 2024 at 7:32 AM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Thu, Oct 3, 2024 at 3:21 AM Jeff Layton <jlayton@poochiereds.net> wrote:
> >
> > On Wed, 2024-10-02 at 17:26 -0700, Rick Macklem wrote:
> > > On Wed, Oct 2, 2024 at 9:16 AM Thomas Haynes <loghyr@gmail.com> wrote:
> > > >
> > > >
> > > >
> > > > > On Oct 2, 2024, at 5:51 AM, Jeff Layton <jlayton@poochiereds.net> wrote:
> > > > >
> > > > > On Tue, 2024-10-01 at 22:24 -0700, Thomas Haynes wrote:
> > > > > >
> > > > > > > On Oct 1, 2024, at 6:11 AM, Jeff Layton <jlayton@poochiereds.net> wrote:
> > > > > > >
> > > > > > > Another delstid question. Consider the following situation. All opens
> > > > > > > have WANT_OPEN_XOR_DELEGATION set:
> > > > > > >
> > > > > > > 1/ Client opens a file r/o. Server doesn't assign a delegation, so an
> > > > > > > open stateid (with seq=1) is returned.
> > > > > > >
> > > > > > > 2/ Client opens the file again for r/w. Server assigns a delegation and
> > > > > > > skips updating the OPEN stateid's seqid and sending the result back to
> > > > > > > the client.
> > > > > > >
> > > > > > > Is that wrong behavior? It seems like that would morph the open stateid
> > > > > > > for this openowner without updating the client as to the new stateid.
> > > > > > > The delegation does cover it in that case, but it seems less than
> > > > > > > optimal if the client ends up returning that delegation later.
> > > > > > >
> > > > > > > If the client already holds an open stateid, should we ignore
> > > > > > > WANT_OPEN_XOR_DELEGATION?
> > > > > > > --
> > > > > > > Jeff Layton <jlayton@poochiereds.net>
> > > > > >
> > > > > >
> > > > > > It seems to me we can’t break the upgrade, so we have to honor the WANT_OPEN_XOR_DELEGATION by returning an upgraded open stateid.
> > > > > >
> > > > > > I.e., if the client already has an open stateid and presents an WANT_OPEN_XOR_DELEGATION, then cannot return just a delegation. Either we just upgrade the existing open stateid or we upgrade it and also return the delegation.
> > > > > >
> > > > > > Likewise, if we had already returned a delegation stateid, we should just return a delegation stateid.
> > > > > >
> > > > > > Feel free to argue with me ….
> > > > >
> > > > > No, that makes sense I think.
> > > > >
> > > > > Would it be OK to just ignore WANT_OPEN_XOR_DELEGATION in this case,
> > > > > and return both an updated open stateid and the delegation stateid?
> > > > > That's probably the more desirable outcome (regardless of the "XOR" in
> > > > > the name).
> > > > > --
> > > > > Jeff Layton <jlayton@poochiereds.net>
> > > >
> > > >
> > > > It is a hint, none of the language states it MUST return one or the other.
> > > The only bother is that you have to provide a reason for ignoring it.
> > > Having said that, I doubt clients care what the reason is and I'll
> > > note that a client is being "dumb" if it uses the
> > > OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION flag
> > > in this case.
> >
> > Do we need to provide a reason? I think we can just ignore this flag
> > and send both stateids in this case. We're not denying the delegation,
> > so there is no need to send a WND4_* status code.
> Oops, yes, you are correct. If you are replying with a delegation, you
> don't need a "why I didn't" flag. I was thinking that these had to be returned
> whenever you ignored a WANT flag, but that is not what the RFC says.
> (I now need to check the FreeBSD server to make sure I got that correct
> when I implemented it.)
>
> However, for a typical XOR case (where the client does not have an Open
> already) and choosing to not issue the delegation...
> --> It is not 100% obvious if a WND4_* flag is required in the reply?
> (I would say it is not required, because the server is satisfying the
> request, but??)
Hmm. Here's what RFC8881 says:
If the server supports the new _WANT_ flags and the client sends one
or more of the new flags, then in the event the server does not
return a delegation, it MUST return a delegation type of
OPEN_DELEGATE_NONE_EXT. The field ond_why in the reply indicates why
no delegation was returned and will be one of:
It sounds like it is clear, in that a WND4_* reply flag is needed if an Open
with OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION does not
get a delegation in the reply.
This brings me to something else that is not explicit in the draft...
--> OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION only seems
meaningful when it is combined with one of the other
OPEN_SHARE_ACCESS_WANT_xxx flags.
Is this correct? Should this be explicit in the draft?
rick
>
> rick
>
> >
> > --
> > Jeff Layton <jlayton@poochiereds.net>
- [nfsv4] OPEN_XOR_DELEGATION when there is existin… Jeff Layton
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Thomas Haynes
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Jeff Layton
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Jeff Layton
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Thomas Haynes
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Thomas Haynes
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Jeff Layton
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Jeff Layton
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Thomas Haynes
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem
- [nfsv4] Re: OPEN_XOR_DELEGATION when there is exi… Rick Macklem