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

"J. Bruce Fields" <bfields@fieldses.org> Thu, 21 October 2021 02:18 UTC

Return-Path: <bfields@fieldses.org>
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 A9A603A0F74 for <nfsv4@ietfa.amsl.com>; Wed, 20 Oct 2021 19:18:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=fieldses.org
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 xl1mO_nZ9zvo for <nfsv4@ietfa.amsl.com>; Wed, 20 Oct 2021 19:18:38 -0700 (PDT)
Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B346C3A08AC for <nfsv4@ietf.org>; Wed, 20 Oct 2021 19:18:38 -0700 (PDT)
Received: by fieldses.org (Postfix, from userid 2815) id 84CCD50D7; Wed, 20 Oct 2021 22:18:34 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 84CCD50D7
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1634782714; bh=s7a9dy7E0SL9VOIQ0ww8wGywYtoN7+8XF3xvU09PZh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=APW2XO4AMSNiKc6byR7Kiv7sFxWjXCcuDaK96JWVBS6CLo7+g+/Tn3zprvtQYxnJ9 JI7RNQPkqvksa9e48QEAtjB2QCszvHrGBeeqjKmz9hl9CyP0eM3We+g0a1qgNN9jCV 61u3Gfpy8usWvOQ0Yq2CnKn1llImdKgqqyRVrfYQ=
Date: Wed, 20 Oct 2021 22:18:34 -0400
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Thomas Haynes <loghyr@gmail.com>
Cc: Rick Macklem <rmacklem@uoguelph.ca>, NFSv4 <nfsv4@ietf.org>
Message-ID: <20211021021834.GB11612@fieldses.org>
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> <E121A27A-7D25-4E86-B079-9FD4DE2BEEFA@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <E121A27A-7D25-4E86-B079-9FD4DE2BEEFA@gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/Q16FV_UiqoVTavwfRYOiUjM4olE>
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 02:18:44 -0000

On Wed, Oct 20, 2021 at 06:50:29PM -0700, Thomas Haynes wrote:
> 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.

Return 0 to the application in the first case, and ENOTSUP in the
second?  Is that a problem?

> 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?

Unless the client's trying to do some optimization, as in Rick's case,
it doesn't sound likely to cause a problem.

I could see how EINVAL could cause practical problems, though.  E.g. an
application probably knows how to handle NOTSUPP--it can fall back on
writing zeroes, or something.  EINVAL, though, sounds like something's
just broken, and it's not clear how to recover.

Ditto a tar application getting NOTSUPP on getxattr.

You're probably right on the letter of the spec.

But we definitely need a way to indicate these features aren't supported
on a per-filesystem basis, and it sounds like NFS4ERR_NOTSUPP is likely
to work in practice, so maybe just going with that is the least bad
option....

--b.