Re: [nfsv4] Can NFSv4.2 operations be optional on a per server file system basis?

Thomas Haynes <loghyr@gmail.com> Thu, 21 October 2021 01:50 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 4D31B3A0EFF for <nfsv4@ietfa.amsl.com>; Wed, 20 Oct 2021 18:50:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9m-hX2U039Cz for <nfsv4@ietfa.amsl.com>; Wed, 20 Oct 2021 18:50:35 -0700 (PDT)
Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1778D3A0EFD for <nfsv4@ietf.org>; Wed, 20 Oct 2021 18:50:35 -0700 (PDT)
Received: by mail-pg1-x52c.google.com with SMTP id t7so9705789pgl.9 for <nfsv4@ietf.org>; Wed, 20 Oct 2021 18:50:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Z+fMpRQeGstfNg7YR+CIguy8unn5skiAdMN2dzdVpRg=; b=F90izRRX0Fvgv0aQGsjmsMD3Fbm84Ej5BQGrqEQ21iULB9BsMfSACdWAodSRoFPgg8 01JEMA8e2370wrGwe5Bg5y1H24wheE1dpD/PnkvbbjGSgo3Lc3qBL6eJjp+Le6Kt4t5t 3UNLby5DfbbZPr3vJSQb9wDxuvItWnJQKpCA1+SxjnAOQsB7QpLfK+2AgRGKmiziKDE7 ThNmOMHFNOAhTVRde403veLeCfuVvEyLPk/cImUbfqkeopNiiWoflrMr/c+biflUnlHP C+P5bTIu10ab8LwdZ3U0FzhHpRrDEJIZpMF3YFFGDWoOpTLmeZWKRUu95yb4rShzwUdH J0IA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Z+fMpRQeGstfNg7YR+CIguy8unn5skiAdMN2dzdVpRg=; b=6Z6ps0/GUuRMr7BSas7ntL13bnV8ijxP/Wop/O6Fpcv/0bIIi/rgyf0PL6juss0ACH dC0i8rOR3Yx6/i4QJTksknk5va53O3kjMY9oHPDVXskhimmeRZfrGIHg4X63B2c8nhYO vArIMJGYYnCCgRL89PAsOxubXLGJ3djwGh0YwCNuVD2k0cBS5G/cK3my3KTx9YbDxOWU ej5n5yt20eoNNayeab6xwufmp5Lw/Ot8fY/ZBrHw7Me5oIA+h4DDwQWqriiEQbUULNbX yfTU4fvKhNECJkCdWtZR6593QFik6cHDJT2EHLzjwK0DsvIGrigppcdJRq2ErGi3Wkov IeWA==
X-Gm-Message-State: AOAM533V4A5EY89w94vY8Vi1YzW4ZTdJQ7zQADBKjRRrTj37LOeyn8rp nQorJlBIks1s5nsMYnaSemY/kz+73blXow==
X-Google-Smtp-Source: ABdhPJxbNdDXKe1Gy2dKamWREKYnulg81bUKwqwOprib0/yxi3Rqs5TWR+LO/Pv4kzZRkTQoTYoXvA==
X-Received: by 2002:a62:dd15:0:b0:44c:61de:537 with SMTP id w21-20020a62dd15000000b0044c61de0537mr2270163pff.57.1634781030636; Wed, 20 Oct 2021 18:50:30 -0700 (PDT)
Received: from smtpclient.apple (c-69-181-67-218.hsd1.ca.comcast.net. [69.181.67.218]) by smtp.gmail.com with ESMTPSA id r8sm3456022pgp.30.2021.10.20.18.50.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Oct 2021 18:50:30 -0700 (PDT)
From: Thomas Haynes <loghyr@gmail.com>
Message-Id: <E121A27A-7D25-4E86-B079-9FD4DE2BEEFA@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_8055014C-6445-4AEC-928A-38D7F96D2383"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Date: Wed, 20 Oct 2021 18:50:29 -0700
In-Reply-To: <YQXPR0101MB0968B884DF6F28FFB3B5DCA2DDBE9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
Cc: "J. Bruce Fields" <bfields@fieldses.org>, NFSv4 <nfsv4@ietf.org>
To: Rick Macklem <rmacklem@uoguelph.ca>
References: <YQXPR0101MB0968D58C78D6E9ACBF7B8A3FDDB49@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <683B4D58-BFDF-465D-9E77-607819354EAA@gmail.com> <YQXPR0101MB0968AE1F6DD2D47EC458B7D7DDB49@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <CADaq8jcN5tv7RMOY=_1BktUsWkqEmUy-w2aygiURBNZC9LBPDQ@mail.gmail.com> <YQXPR0101MB09684B8F12901E7B0A796A97DDB99@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> <20211019180511.GA18024@fieldses.org> <YQXPR0101MB0968B884DF6F28FFB3B5DCA2DDBE9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/3Y6-_6iPFw-yK2Bcchkd57jj6q8>
Subject: Re: [nfsv4] Can NFSv4.2 operations be optional on a per server file system basis?
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
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, 21 Oct 2021 01:50:41 -0000


> On Oct 20, 2021, at 5:10 PM, Rick Macklem <rmacklem@uoguelph.ca> wrote:
> 
> Well, what do others think of this?
> 
> Thomas Haynes wrote:
>> The answer is “no”.
> Well Tom, when I first red RFC7862 I assumed that the "optional features" were
> "per server", but when I look in the RFC I cannot see that stated.
> In Sec. 1.2:
>   NFSv4.2 is a superset of NFSv4.1, with all of the new features being
>   optional.  As such, NFSv4.2 maintains the same compatibility that
>   NFSv4.1 had with NFSv4.0.  Any interactions of a new feature with
>   NFSv4.1 semantics is described in the relevant text.
> 
> It clearly states that all new features are optional. It does not state if the
> option is "per server" or  "per server file system" (or "per server file" for that
> matter).
> 
> Then in Sec. 1.3:
>   A major goal of the enhancements provided in NFSv4.2 is to take
>   common local file system features that have not been available
>   through earlier versions of NFS and to offer them remotely.  These
>   features might
> This kinda hints that the new features are based on local file systems
> in the server, so supporting the new feature "per server file system"
> doesn't seem too much of a stretch?
> 
> I could not see any statement that optional features were "per server"
> in the RFC (but I might have just missed it?).

Honestly I went with what I *thought* I intended. The best supporting evidence is here:

15.1.1.5.  NFS4ERR_NOTSUPP (Error Code 10004)

   Operation not supported, either because the operation is an OPTIONAL
   one and is not supported by this server or because the operation MUST
   NOT be implemented in the current minor version.

Which implies that the if OPTIONAL the operation is either entirely supported by the server or not.

What is a client supposed to do if it tries ALLOCATE and the server accepts it -- it tries again and the server replies NFS4ERR_NOTSUPP.  Is the support based on time of day? Did something change on the server?

You and I may know it is by filesystem, by how is that exposed to the client?


> 
> Then J. Bruce Fields wrote:
>> For what it's worth, I looked at the Linux knfsd code, and it looks like
>> it will in fact return NFS4ERR_NOTSUPP in this case.
>> 
>> That's probably not the only case.  E.g. (again from just looking at the
>> code) I suspect that's what we do you request an xattr from a filesystem
>> that lacks xattr support (even though GETXATTR is supported and might
>> succeed given a filehandle on another export).
>> 
>> Without testing right now, I *think* the Linux client just passes that
>> back to the application (probably as EOPNOTSUPP).  It doesn't give up on
>> ever using FALLOCATE against that server again.
> So, it appears that the Linux knfsd server is shipping with optional features
> on a "per server file system" basis and that the Linux NFSv4.2 client handles
> that.
> 
> The FreeBSD NFSv4.2 client is slightly broken, in that it has an "optimization"
> where, if it sees a NFS4ERR_NOTSUPP reply, it marks the operation not supported
> and does not attempt it again. This optimization could easily be removed for the
> next release and appears to be broken w.r.t. extant Linux knfsd servers, so I should
> remove it anyhow.
> 
> So, could we just clarify that NFSv4.2 optional features are "per server file system"?
> 
> rick
> 
> --b.
> 
> 
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4