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

Rick Macklem <rick.macklem@gmail.com> Thu, 04 April 2024 23:23 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 70595C14F70D for <nfsv4@ietfa.amsl.com>; Thu, 4 Apr 2024 16:23:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 lSiggNMR-Gnh for <nfsv4@ietfa.amsl.com>; Thu, 4 Apr 2024 16:23:33 -0700 (PDT)
Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (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 0C524C14F6EA for <nfsv4@ietf.org>; Thu, 4 Apr 2024 16:23:33 -0700 (PDT)
Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5dca1efad59so1220728a12.2 for <nfsv4@ietf.org>; Thu, 04 Apr 2024 16:23:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712273012; x=1712877812; darn=ietf.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Lb0I+TODGnJlfZB4QyjHHHbq2xABpSKhaqIlLkRLrXc=; b=PRe/F2gzrj0cUelMHD8mpR++iRXAepHKtwz4+IPkEFCvEt+QhUn9RFt2aXRR97/aZP X0GFssaMSpMWw+fOQKU5dM6VOU8TnIwep0aMLB2hkkOiCh/cv4hEk3FCtTkm3vY8h1PK 4ifhyvmyqrJfYKhh7lu81FVkR31gx8val5NUuX9HQJjln5qPRX1YcjFg9U4k1IsNqGmZ ptCrAOp2qmR9G40i4/huT1K9nislh5KNCjrsRMC20Jd1GcgHZbm5SMGaKtV0VBIT0NXh S+d1OIaveUbVtMBt2tahx5tretErtOCD0pwIzUGmVF5aCUlZgMnBpLH4PP0PLbR45iQh EV+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712273012; x=1712877812; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Lb0I+TODGnJlfZB4QyjHHHbq2xABpSKhaqIlLkRLrXc=; b=ql4z0pgoClfa+Upd19y0X/ztmyi2ywDBKF9tjQVYSVAVxU+xr3z+1ibjoe8CA+Qq2M eSfgZEBjBmFlVHddIqWPeYw5WP+FUJTCFh26O/h27v+jRQarHn6s7QF9JBAIEIGQlaTz 7Xs88KfFBigEIjvc3SjLw/Zol/7OtGdBguniST+5EF8lOq50fERmBtwfMs2znCx/FTHM XfsmH1cAEPAYOjt/g3LL5ni7gbStRT/aLvAvXCL++PsllbpBNmu2H5ARMCK3rtJoJsVY 8LNRQa3eqjjmykJNmGaHjCs7V26yjS2PUCtb1aaeVYdVARxALe6BydPM/wn8pUEfQlG/ c30A==
X-Gm-Message-State: AOJu0Yyodxzkmgn/dAJmqtOvsulErHlBJKZbkK0LYSnMcxXKJcVFRcxd +ZD8D0rSpbxZtv+TEwgEib7z2fEoxa8U9bbVc4F5qnKp3ZXFQcrjhuGL1mjlroZymKYCDok+nLJ ononr2SIa7IL3Y42ngylNs2DvXRSaOP3qPA==
X-Google-Smtp-Source: AGHT+IHpmIY3pMCuCbQ6q8d1xUhdCVUJbApoAc5LxW/TXkS/glFsdMLgOAUPVpeJOpkVW5DVbJy4es9K8VTpMKjThnc=
X-Received: by 2002:a17:90a:d997:b0:2a0:4c3b:2c39 with SMTP id d23-20020a17090ad99700b002a04c3b2c39mr4633809pjv.23.1712273011935; Thu, 04 Apr 2024 16:23:31 -0700 (PDT)
MIME-Version: 1.0
From: Rick Macklem <rick.macklem@gmail.com>
Date: Thu, 04 Apr 2024 16:23:21 -0700
Message-ID: <CAM5tNy4y36AEyD5SeOZ2F1t8AYhu8-ZKPyNvCd-dmydFg1kJtA@mail.gmail.com>
To: NFSv4 <nfsv4@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/ZD-6j8kYvvKWKM4l5fEIZaoKHvw>
Subject: [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: Thu, 04 Apr 2024 23:23:33 -0000

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.

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?

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.

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.
Note that, usually, a client would not be rebooting when a server is in its
grace period, but that could happen.

Bottom line...
Should a client perform Open/Claim_Delegate_Prev before or after
Reclaim_Complete?
And, if the answer is "after", how does the server know when a client
is done recovering opens/delegations via Open/Claim_Delegate_Prev?

Thanks for any help with this, rick