Re: [nfsv4] RFC: Is Open/Claim_Delegate_Prev done before/after Reclaim_complete?

David Noveck <davenoveck@gmail.com> Fri, 05 April 2024 19:50 UTC

Return-Path: <davenoveck@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 EAF82C14F6BB for <nfsv4@ietfa.amsl.com>; Fri, 5 Apr 2024 12:50:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] 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 mox-aapHUXs5 for <nfsv4@ietfa.amsl.com>; Fri, 5 Apr 2024 12:50:18 -0700 (PDT)
Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4AB6FC14F6B2 for <nfsv4@ietf.org>; Fri, 5 Apr 2024 12:50:18 -0700 (PDT)
Received: by mail-qv1-xf2b.google.com with SMTP id 6a1803df08f44-699312b101fso12250426d6.1 for <nfsv4@ietf.org>; Fri, 05 Apr 2024 12:50:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712346617; x=1712951417; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OfLuXfLVrdHcAeBt7nPae6dXCxGl9QSZpKcgz2xKOdI=; b=bBj0dMp4oDsKar8aNAIYIKZW21JzGYeagG6wZhHFB3lZles6R8xrG30a7DDairCA+q kn0Dc6u0aEVRwB29WBjJMmJ/TXeCFBTkqku+L1+HQm9C+/AOAOztmPgsst/fzwFKIha5 jtCtuv6kj5MpcpvtgwI7AKszZXyjQXqpNXNF+6XXdQWp+8d9htUBFRk5P8mgrsegGbWB WS1yge2mZNyT2XLvQRNvIhZfPQTl+trxIsm5EpUbJIZkZKxuy9VHcZg0gcCvss2qs6LL a7aU3nqSQm5uRNAb96yw1rUWrKe6de49tyOiwkXz7o2/gJgzkFxPlTB0Znuawd+lnT81 YoVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712346617; x=1712951417; h=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=OfLuXfLVrdHcAeBt7nPae6dXCxGl9QSZpKcgz2xKOdI=; b=jHCpliafqSLWw26PUuFJvemx2slpvtwLYCauirUpJVLzYfwhLPfXVmiPCgGStOMXam q5kLqsxhMFbtJEE5bwvvfwBMirYZP43BR92DsGwOUzew8auplpIaEIiGvKwW42dl+7uU QD3vpfIAD4MYJM1uhlbZJgEnaiMIl7uRKLvWswBsUWwfaabx+Mo9THuYoKXUbTLyiGQR b9l707HZlNxmLSyWuFXIevsxDoR6qgg36qXBv4dUnbpxuBSMeYOnJm/yT/SDeiU8oKlN DFsayDcm1EkhRcMEJSsIOkLfMRXW0hOlGOK7EYTk5XZ0bVm3HWfZg/OQ/IkvXpSAxiHy E3fw==
X-Gm-Message-State: AOJu0Yx4zj/7ruuaAk8SfnAsV1a71AAtVHN89mvogH9rmmfWkvm+ksV8 g3k/Lvs90dndy944lUZlA/CPBWqvwGc4Lt2t1zovwlmHGLbB3p6++KYmi1xxdadoKscuossIgCa Id9YuHCvz8lh0o+zRebOu4gCxZ6Q=
X-Google-Smtp-Source: AGHT+IHjxFi4hT9aOCPd6XpYQlgsiFjdEtybRcAqE0k5wb9pFdfa3KjpUI7d8W+Ad0mimas+fpH66uWlB254b3w4z1k=
X-Received: by 2002:a05:6214:2308:b0:699:310f:5058 with SMTP id gc8-20020a056214230800b00699310f5058mr2669454qvb.31.1712346617289; Fri, 05 Apr 2024 12:50:17 -0700 (PDT)
MIME-Version: 1.0
References: <CAM5tNy4y36AEyD5SeOZ2F1t8AYhu8-ZKPyNvCd-dmydFg1kJtA@mail.gmail.com>
In-Reply-To: <CAM5tNy4y36AEyD5SeOZ2F1t8AYhu8-ZKPyNvCd-dmydFg1kJtA@mail.gmail.com>
From: David Noveck <davenoveck@gmail.com>
Date: Fri, 05 Apr 2024 15:50:05 -0400
Message-ID: <CADaq8jdUd_6j0sq-1OFmtOAcX000a=2YbK3cZCg2QprLuXv3Qg@mail.gmail.com>
To: Rick Macklem <rick.macklem@gmail.com>
Cc: NFSv4 <nfsv4@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000db238d06155ec373"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/8IDy5yQ_458Hkihk8TEbT8ki5qQ>
Subject: Re: [nfsv4] RFC: Is Open/Claim_Delegate_Prev done before/after Reclaim_complete?
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Apr 2024 19:50:19 -0000

On Thu, Apr 4, 2024 at 7:23 PM Rick Macklem <rick.macklem@gmail.com> wrote:

> Hi,
>
> I am in the process of implementing Open/Claim_Delegate_Prev and have run
> into a question I cannot seem to answer from reading RFC8881.
>

Let me see if I can make this clearer in rfc5661bis-04.  Fingers croosed.

>
> There is this snippet:
>    enum open_claim_type4 {
>            /*
>             * Not a reclaim.
>             */
>            CLAIM_NULL              = 0,
>
>            CLAIM_PREVIOUS          = 1,
>            CLAIM_DELEGATE_CUR      = 2,
>            CLAIM_DELEGATE_PREV     = 3,
>
>            /*
>             * Not a reclaim.
>             *
>             * Like CLAIM_NULL, but object identified
>             * by the current filehandle.
>             */
>            CLAIM_FH                = 4, /* new to v4.1 */
> The comments in the above seem to "hint" that CLAIM_DELEGATE_PREV is a
> reclaim type operation.
> If that is the case, I'd assume it/should be performed by the client
> before it does a
> Reclaim_Complete?
>

I think that's right.

>
> Then there is this snippet:
>    For OPEN requests that reach the server during the grace period, the
>    server returns an error of NFS4ERR_GRACE.  The following claim types
>    are exceptions:
>
>    *  OPEN requests specifying the claim type CLAIM_PREVIOUS are devoted
>       to reclaiming opens after a server restart and are typically only
>       valid during the grace period.
>
>    *  OPEN requests specifying the claim types CLAIM_DELEGATE_CUR and
>       CLAIM_DELEG_CUR_FH are valid both during and after the grace
>       period.  Since the granting of the delegation that they are
>       subordinate to assures that there is no conflict with locks to be
>       reclaimed by other clients, the server need not return
>       NFS4ERR_GRACE when these are received during the grace period.
> This clearly states that CLAIM_DELEGATE_PREV cannot be performed
> during the server's grace period.
>
>
It seems to me that this is an oversight.


> The above two statements are not necessarily contradictory but it does seem
> that, if the server is in its grace period, the Reclaim_Complete needs to
> be
> done before any Open/Claim_Delegate_Prev, since Reclaim_Complete tells
> the server when to end its grace period.
>

Yes.


> Note that, usually, a client would not be rebooting when a server is in its
> grace period, but that could happen.
>

Yes it can.  It wouldn't matter if you said "MUST NOT" or "IST STRENG
VERBOTEN".

>
> Bottom line...
> Should a client perform Open/Claim_Delegate_Prev before or after
> Reclaim_Complete?
>

Before.


> And, if the answer is "after", how does the server know when a client
> is done recovering opens/delegations via Open/Claim_Delegate_Prev?
>
> That's why "after" is not a good answer.


> Thanks for any help with this, rick
>
> Thanks for bringing this up.


> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4
>