[nfsv4] Re: OPEN_XOR_DELEGATION when there is existing OPEN stateid

Rick Macklem <rick.macklem@gmail.com> Wed, 02 October 2024 02:07 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 12B59C1CAF3F for <nfsv4@ietfa.amsl.com>; Tue, 1 Oct 2024 19:07:01 -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 m_L_s7mzGJRX for <nfsv4@ietfa.amsl.com>; Tue, 1 Oct 2024 19:07:00 -0700 (PDT)
Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 A2BFCC1CAF38 for <nfsv4@ietf.org>; Tue, 1 Oct 2024 19:07:00 -0700 (PDT)
Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5c8a2579d94so2100895a12.0 for <nfsv4@ietf.org>; Tue, 01 Oct 2024 19:07:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727834819; x=1728439619; 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=hhZTbdonOevx82JX7vgiWBU2R130yd7FTVLGzK6HDHo=; b=EfJ7p4lwBzRfP5fr2t4aO85QjAdT3/+HUhCmmFamvpV6hzPqbhwQ52GSZd+E1gkz3B NjNWHmr0+0LsOSAqvNAZvd8krLchfeUgLv+IW1cF0F+lBkgwn+nNWWDdTJsUPrqFQ0PF Slp0lYYSYg2dDhO0rasKL5qe0BRJ+ImPeytxlntMO+mnYNHaTdPUB68NAuEhsy8tM9oP dAxJjl9Vu4GQF5u9wac7Twa62nvCBN/Nkv6zYXJs+Yl3gl3aCU8NM3qNQ2qVIEjBguqb Vr3aljCdGtPyyJBLICBqodSdchx6FD3nnqXVj3xzZJz+wCDCVhl2tdQbjJ6lxNo/CDvA b7GA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727834819; x=1728439619; 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=hhZTbdonOevx82JX7vgiWBU2R130yd7FTVLGzK6HDHo=; b=QZLBN2VdVDH8jR6jVpCnTd6qTpMnS9Fgw15Ni6DzUUqHFFQJ/GDQbBPrADtc7gfT1p KOS4X9umQkp3nP/xHQabnYwokcIJgj02bSWHeleZWeulRX4yHvlNJW3bajezGbw1ZZ85 8tsvPF+Y0UdaKjKeUVUOiTCtB6r7lGfiXvtpqjLaf2iSVaWoP8Vjux7TtBeR221ZajHQ 3hTei80rOP/tLMw9zq5TN7P11twGOZGiNFhDpt6RlWBZbh033tv8CKo34ZiAKtkdldOw 50y3catHpi5ACJB4lDS17MtGcPeLQWDgzSPWnCIDH7faUv9J3n5plnpBYD+6DhhTxmzo xPKw==
X-Forwarded-Encrypted: i=1; AJvYcCW7il+IUtRxbwygVn0zm+uAB51kf0/jgYtdgHUKshDpq/j4NZUdO/ImUZgg3UGiiKn3t3sO7Q==@ietf.org
X-Gm-Message-State: AOJu0YzhZi6kTomE16Zt1IfJH5qsyoZ6Skh3gmK6dgHTil1vUE/jWC4U vglUBoc3XQZtfMEJl4gXFdnV1yKAzDM5oZl8tOn48juZmtaLZXw49YFvxRMswKaEudvRHoG4B4v 9TeChZH4MA7f+Ic0msgu2Ik90vA==
X-Google-Smtp-Source: AGHT+IEzXvvmp2u6v4f4vUTJqvtk4O1l2pTCroze8KdDRSVnjzxlekA4dqJyo2k3mhW6eygSH0X0Onq4Q3wXwll5kv0=
X-Received: by 2002:a05:6402:35cc:b0:5c8:a19d:e031 with SMTP id 4fb4d7f45d1cf-5c8b1a377ebmr907799a12.15.1727834818883; Tue, 01 Oct 2024 19:06:58 -0700 (PDT)
MIME-Version: 1.0
References: <6d1a1371de69d93a682f0c202669c46089033c67.camel@poochiereds.net>
In-Reply-To: <6d1a1371de69d93a682f0c202669c46089033c67.camel@poochiereds.net>
From: Rick Macklem <rick.macklem@gmail.com>
Date: Tue, 01 Oct 2024 19:06:48 -0700
Message-ID: <CAM5tNy6YndJSJHqHYKPD1Nh+Q-DTPFq0En6QndpWAV=_0Cszvg@mail.gmail.com>
To: Jeff Layton <jlayton@poochiereds.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: A3RNBLZKLFOKFHJG3D55AB5LSESZHS5K
X-Message-ID-Hash: A3RNBLZKLFOKFHJG3D55AB5LSESZHS5K
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.9rc4
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/VHNkivC58BHUnZoEquFWJJTkJmc>
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 Tue, 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?
Seems fine to me.  Right now (without the delstid extension) a client can
hold several open stateids for a file (different open_owner4's) and each of
these has a seqid field that is incremented when additional
Opens/Open_downgrades/Close
are done on that stateid.  The stateid.seqid for other Opens for the same
file are not affected.
Similarly, issuing a delegation for the same file does not affect the
seqid in the
open stateids for the same file.

So, why would issuing a delegation without an open stateid be any different?

> It seems like that would morph the open stateid
> for this openowner without updating the client as to the new stateid.
I'm not sure what you are thinking of here?
The open stateid still refers to a r/o Open and
has nothing to do with the delegation (except they happen to refer to the
same file).

> 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 does a delegreturn, the r/o open still exists for the client
unless/until it does a Close. (It actually could be more optimal for the
client to retain the r/o Open, so that it does not need to re-acquire it
before doing a Delegreturn, I think?)

Now maybe I didn't understand OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION,
but I didn't think it said anything about Opens already issued to the client?

>
> If the client already holds an open stateid, should we ignore
> WANT_OPEN_XOR_DELEGATION?
As I understand it, a server can always ignore the OPEN4_SHARE_WANT_xxx
flags, but I do not see a reason for the server to choose to ignore it
in this case?

Maybe I am missing something and others can clarify it, rick

> --
> Jeff Layton <jlayton@poochiereds.net>
>
> _______________________________________________
> nfsv4 mailing list -- nfsv4@ietf.org
> To unsubscribe send an email to nfsv4-leave@ietf.org