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

Rick Macklem <rick.macklem@gmail.com> Wed, 02 October 2024 03:18 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 1C369C1CAE8F for <nfsv4@ietfa.amsl.com>; Tue, 1 Oct 2024 20:18:25 -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 Wtb_yAK8g8Qa for <nfsv4@ietfa.amsl.com>; Tue, 1 Oct 2024 20:18:24 -0700 (PDT)
Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450: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 A711AC1CAE8E for <nfsv4@ietf.org>; Tue, 1 Oct 2024 20:18:24 -0700 (PDT)
Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a8d0d82e76aso1002644666b.3 for <nfsv4@ietf.org>; Tue, 01 Oct 2024 20:18:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727839103; x=1728443903; 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=pcNenmqFlbNJa398V3laS9PSF7jIeim4rphL7AN9/DU=; b=COGpSLuFCdJ4h9aX0dV7IongKg8fjVADpk8+33vkOjC8bUcCXkW2j3LzA1+hbMCmtL LnurtVwnE8ZlQaG6BxEut2LlSca5i4WrLYQmtcnY4YLlRBTpdCZCw98N5N+1paJPsEtQ VExr+uY+cBprTdom3zTsJn3/OvxjJrdEGku3xp5rQ8jQLsxTCsaiIAnOkA3Cy181ubOV oTZj8KGIbfNgkqqfyJLCysWwHjVUnVNttFOse4Z4E2upDb6rYEbdHo4lG/GvHLKjxzCb ni7fc79MrCvVsBFl6CYxjilmNHmArhBkvhYuy2XBoknIAaX8R02n0DS6sOw9GFh/oAIY zeGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727839103; x=1728443903; 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=pcNenmqFlbNJa398V3laS9PSF7jIeim4rphL7AN9/DU=; b=uaPiwx4sNqbzUzf5qMUYTNRZeUykldDi7fo7LHnv8Fdupsjauk2p4IV+WPXe01Edpw T/Y9M+lbT6N9/BSzOe+2XIsnxchQUsyDqwcAhMaqVkWgLpm9rPt+Pf8j9kpDPbfv1/Ed I5yGXtlyR2bs22MFALGl1wOnLUF6TXZaTowC8ztlTSUQQL/WWqybIbegIXZSmWP6tSyY Ab7PfIgFJzlotugSOLp2mPQDr2Hax+g2XAzKc9AJA5T98ECLFMj5Qdz639ptCCZfQOuY 8eipYusvaUD9f3VsZiWolovg2bgUKf0HrekIA2OXcbXI9l/ges7s1vCGsfh4V1XGlsyv KctQ==
X-Forwarded-Encrypted: i=1; AJvYcCXu0CzA2XMRYgkbChzRV9nMhc62m2BT4Pqwu0Kb0ZnB/oKgoKOjhkU4yQhajtt2u9IG+UnI2w==@ietf.org
X-Gm-Message-State: AOJu0YyhRYSleB8j1psp0zYgpFu5F4X3Ftwxi1795hOSU2NCrfrILoer kY/SmaWVrtc6CqzVc5sFIjXIEaP7btrX2WU8+m3G9lT1+R/PFpTa/krMG4HF+3l07KJc+CC+GAv d3jj4/c+RZJKorqAsuq53811UAA==
X-Google-Smtp-Source: AGHT+IHggGLre42XvEvQgMY0Hk7er/zKU6edRptoq06tKEKVzeaNlWhN6iE+8M8PzNO0xfkDCERJSkiaFXn17WQNNw4=
X-Received: by 2002:a17:907:960c:b0:a8a:78bb:1e2 with SMTP id a640c23a62f3a-a98f8207fe8mr169631466b.6.1727839102822; Tue, 01 Oct 2024 20:18:22 -0700 (PDT)
MIME-Version: 1.0
References: <6d1a1371de69d93a682f0c202669c46089033c67.camel@poochiereds.net> <CAM5tNy6YndJSJHqHYKPD1Nh+Q-DTPFq0En6QndpWAV=_0Cszvg@mail.gmail.com>
In-Reply-To: <CAM5tNy6YndJSJHqHYKPD1Nh+Q-DTPFq0En6QndpWAV=_0Cszvg@mail.gmail.com>
From: Rick Macklem <rick.macklem@gmail.com>
Date: Tue, 01 Oct 2024 20:18:12 -0700
Message-ID: <CAM5tNy7UmDzhNK=KqfLym1tjPT=84hdxubbTf8i0yt2NdQP99Q@mail.gmail.com>
To: Jeff Layton <jlayton@poochiereds.net>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: RQXHYJVGALLEANW4JO7C4TIQHL2US7JO
X-Message-ID-Hash: RQXHYJVGALLEANW4JO7C4TIQHL2US7JO
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/__qvJxJM2x2M7LthqYrmaXgVLLE>
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 7:06 PM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> 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?
Oh, maybe now I understand what you are asking...
--> Should #2 upgrade the Open to r/w?
    - Then, should it only return the updated Open stateid and not issue a
      delegation OR should it ignore the
OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION
      flag and reply with both the updated Open stateid and a
delegation stateid.
OR
--> Do as above and leave the Open r/o, just returning the delegations stateid.

I think this needs to be clarified.  Hopefully Thomas can respond.

rick

> 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