[nfsv4] Re: OPEN_XOR_DELEGATION when there is existing OPEN stateid
Thomas Haynes <loghyr@gmail.com> Wed, 02 October 2024 17:14 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 DD5B9C180B7E for <nfsv4@ietfa.amsl.com>; Wed, 2 Oct 2024 10:14:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.109
X-Spam-Level:
X-Spam-Status: No, score=-2.109 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, 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 YwXw3MxmTZmW for <nfsv4@ietfa.amsl.com>; Wed, 2 Oct 2024 10:14:00 -0700 (PDT)
Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (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 18047C180B79 for <nfsv4@ietf.org>; Wed, 2 Oct 2024 10:14:00 -0700 (PDT)
Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7e6afa8baeaso5900912a12.3 for <nfsv4@ietf.org>; Wed, 02 Oct 2024 10:14:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727889239; x=1728494039; 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=OokiykrbGMe8zWQMOc7YW1t5dsRrWHkdtWvfhHJbc+w=; b=O9KUNWxb6EpcAUPdQT9Sr5Z/oXli/3/ztUmGM0Jw1Dwg/gS34LuCu7JNzmv6vYldqM UqkUhZczJwMPlgaJ4dBy+ka3FdrlQiuYO6X4CuHVRMbSC0TOjQ1y5a85hWT6aypHhUXv gSGyrS1lGQ4huNc1zSNyFfrd2lmBJyPTNhxBFAaDgElCGsCsc85MMx4sSej1DfZwR8Pe izcC4FbTMURhNlFgzCeYEmRFKuv5KEWtaz8lzrZRpDYkX0lTgBzD2q5EqgIcWz5FHuWJ +FlNqFUuqwPFCjFn7d8CMKfql5aSnmxwgYOoPeRMPWnBAGVJcC9JWmNtDoAAV28PjwIJ E/3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727889239; x=1728494039; 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=OokiykrbGMe8zWQMOc7YW1t5dsRrWHkdtWvfhHJbc+w=; b=ksbPRyEb/Y0vEkFq74A/Nc7Ur+j9bDckXCENbp4ztB4OmweLXIa17sYFghM7d38ZF2 iq05WI4pXqoYg2z2voMtoToHKhbvamUWCabOyTsHq+P6cHdfN4XQbOWmxF+AcTQGEgoX bHYG6rZ8pVg+jpgOursCZ1bOpRfPuEQtQ5mA9CfNn5LkF7ZibBX5JeAsDnG4YgSLp8fV +En+ZSbV/iO9UT/NhxgEd9fWTSbnPJ42ht0aZVD/u9buOn7Pimdlhvmj9MXBzcTJYJE/ 1EQzlfsqlqejJ5Ejx4JJ4jLAzImiVJv1kbdADKtm98pOzY12NhIRR/TL1E6rgIhf8+ha maDg==
X-Gm-Message-State: AOJu0YyPec3d3K4h/ouyqscy7zSIfi70crCvTCyLD2MRS2UopEi5Et8e 0bWaHnuQYZLEykCtTY761/JsM6EdFVYikK8Sykv5Q8Wiend5ktgZIGvXqQ==
X-Google-Smtp-Source: AGHT+IEW/idN9QnsbUmK/Q6kAxunRqRlJcZkdEjmvcmvVFo7knNnOoht5tc3/chiQkwHjf/zmac1Xw==
X-Received: by 2002:a05:6a21:1693:b0:1d3:e4e:ff55 with SMTP id adf61e73a8af0-1d5db101999mr5912508637.7.1727889239402; Wed, 02 Oct 2024 10:13:59 -0700 (PDT)
Received: from smtpclient.apple (c-24-23-209-136.hsd1.ca.comcast.net. [24.23.209.136]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2927c7sm10343508a12.1.2024.10.02.10.13.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2024 10:13:59 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3818.100.11.1.3\))
From: Thomas Haynes <loghyr@gmail.com>
In-Reply-To: <D99B6BB8-6676-4F06-A2C5-8D4C47D3E090@gmail.com>
Date: Wed, 02 Oct 2024 10:13:46 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <780EFBD0-823C-4B8A-9674-62FF917A56D1@gmail.com>
References: <6d1a1371de69d93a682f0c202669c46089033c67.camel@poochiereds.net> <F61478EA-3B05-479D-92FA-486EAC52CF2D@gmail.com> <934dfc20501e03031a010ce52eb97604c2eaa289.camel@poochiereds.net> <D99B6BB8-6676-4F06-A2C5-8D4C47D3E090@gmail.com>
To: Jeff Layton <jlayton@poochiereds.net>
X-Mailer: Apple Mail (2.3818.100.11.1.3)
Message-ID-Hash: FAUPFBIQCXZVXRQM36CBR5POLIMKXIIJ
X-Message-ID-Hash: FAUPFBIQCXZVXRQM36CBR5POLIMKXIIJ
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: 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/jR-kVGSknRa6Ah4wLrRRrxe4B_8>
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 Oct 2, 2024, at 9:15 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.
>
> So yes, it is okay.
>
> Let me see if I can still add this text.
Note that the OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION flag is a
hint. The server might return both stateids. Consider the scenario
in which the client opens a file read-only (with
OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION set) and gets only an
open stateid. If the client then opens the file for read-write (with
OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION set), then the server has
three options:
1. Only an open stateid with the correct seqid.
2. Only a delegation stateid with the open stateid now having an
incorrect seqid as it needs to be upgraded.
3. Both an open (which will be upgraded) and a delegation stateid.
In this scenario, returning just a delegation stateid would hide
information from the client. If the client already has an open
stateid, then the server SHOULD ignore the
OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION flag and return both the
open and delegation stateids.
Any objections to that?
- [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