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

Rick Macklem <rmacklem@uoguelph.ca> Thu, 21 October 2021 21:01 UTC

Return-Path: <rmacklem@uoguelph.ca>
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 873CB3A0BC6 for <nfsv4@ietfa.amsl.com>; Thu, 21 Oct 2021 14:01:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 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, RCVD_IN_MSPIKE_H2=-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=uoguelph.ca
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 wMn2NxLcDpCe for <nfsv4@ietfa.amsl.com>; Thu, 21 Oct 2021 14:01:11 -0700 (PDT)
Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670070.outbound.protection.outlook.com [40.107.67.70]) (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 A3CA73A0BCA for <nfsv4@ietf.org>; Thu, 21 Oct 2021 14:01:11 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pt5Zh29FbMMroc4wLVEYI9Xbp6fSDH3u4JvVAjDG9jsXuIAG5Rq/sxOx4zjkOj2fYEEkurI/PIfv81ASacBM03MQCFWPG+/uidBLWiX4lSqExTmRQW4rqOCm6WZCrtxuWTzjENWV8J+OVIh+Vqq640gDTW3U4Z8dC/K0ikGIkGUmphg31TEqzEEs4R4xo1CYVAB+9+ah3hBQGIObrf1943U1+rmhYinvcBSief5/SrSaqRdr4rXX3bLjiN+lmutTU6KaQHyfMrAVoQD71Lc7dNpRi/UgWHaqDqUhUQP6ArMGn/NpBJOikp/7W/ZITLTJoOIxwNDtWfZz6ni3L1J6gA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6dBA6PQDu8IOMPiZMR01JmI47qmHD5zk+POHeEN+DFU=; b=V3gpuqCeAyNHoksKtyL9zxcPzirE4FezR4PLr+1/qF9zCuAKYiSwb7uoCx24kGYlv+doLVh6lV2XOgqlxoqHyK4HGiNsrMvSvCR9IqrJa6w///I6KZGLcoj9ZOXAlai29lj1SwUQaYUEmihCE3J/XGhfF72Z7RahYUW9REko0piC7t7XHn3bi2eR2bLBFGMCjBcjJ7i914mU7LSGw12DUYjfVqSV7rpZUE4gVvYelWPOoqvrIfvFboKYrHyf4BDUu82rZ044+8cmc0JdOdsLvWufdqWVdBImDe48RkB81EfsLgYG+KlTNB2/iKUJEOfd9MPOKHDq4ygqLnsZe7gAJA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6dBA6PQDu8IOMPiZMR01JmI47qmHD5zk+POHeEN+DFU=; b=k8H6bbhgZxU8/qlbtFI1Dql165jFNE8rJuySpBRQ8csvK+Y0sx4sf5FFHyHZfdUJlLh1QPKy58iqNeZgpwm5PuDMjFUviVudI8WHLZ6MhP2HpGs5wQb09zRLbU3SHHfhtDK9ZwDzTnxtXdHHTJzSZEb7TwOzKcW0YoPUtY3iE0g8A2dxabKJGLK1itJier2An8cbuzb/HEKyjm11EZ2/xHdX6QTWxPrzVj7Sku3x3OpSgrgl2FXpTjGuxARoVz5Pbu5zR+PMBnSzcHS3G9wXn+m5LVusys6RNX7l23mp79/kATLR1FDnEatq2cyHAy2T29d7UfgZoWIytTdWNOVsLQ==
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQXPR0101MB1624.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.15; Thu, 21 Oct 2021 21:01:09 +0000
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::7091:13ac:171f:1c12]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::7091:13ac:171f:1c12%5]) with mapi id 15.20.4608.018; Thu, 21 Oct 2021 21:01:09 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: Thomas Haynes <loghyr@gmail.com>, David Noveck <davenoveck@gmail.com>
CC: "J. Bruce Fields" <bfields@fieldses.org>, NFSv4 <nfsv4@ietf.org>
Thread-Topic: [nfsv4] Can NFSv4.2 operations be optional on a per server file system basis?
Thread-Index: AQHXvd+uy+0ZXP+Ezkai9otM7Jmjk6vMihAAgAATSmeAB09jAIAA0zIcgAXsCICAAfPukYAAIGiAgAAH2QCAAC24AIAA3ySAgAArD98=
Date: Thu, 21 Oct 2021 21:01:09 +0000
Message-ID: <YQXPR0101MB0968C8B644EF9B793E0126E8DDBF9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
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> <20211021021834.GB11612@fieldses.org> <CADaq8jd-YHPK400UnPPUyBB8mV-pVUJgC4yTwZu90Qmauxh9aQ@mail.gmail.com> <FA61F429-EECE-44F1-876D-91B912750F8A@gmail.com>
In-Reply-To: <FA61F429-EECE-44F1-876D-91B912750F8A@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
suggested_attachment_session_id: d17838c8-92cc-eafc-def1-6026ffa6b9aa
authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=uoguelph.ca;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: d69f2d86-269c-4982-d97f-08d994d5e850
x-ms-traffictypediagnostic: YQXPR0101MB1624:
x-microsoft-antispam-prvs: <YQXPR0101MB1624343120A1A39EA034683DDDBF9@YQXPR0101MB1624.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:7219;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 5M19FYRJEEmpMT8Nc2wG/Molae2tCwGB8bK1amcp5XbIY5+XK7kUNvbwJumDeY7KnxgWdiFESBu2eLBufTj75sDXFyX/wgWleqwpAIFszE6gjZfUilrQiX03F6pgat1JRjWjnpucCokNSotV8I48FMtXCWYDwa3T97xcxgxF1gAToJGT69sujaTF+fOeloFv2gq6DdkYwvjDA772K4WS8ylpExg13liS7oIIuw5a+j4N2mXap+sO3F+Xpc45ZqV80Z2ATM2NCFBHvnlPFv9AfNIoSgEaMf8GUehU5EnzJ38f4SSzymT6dOrPC4cPIf/TojBGRio8Dc9V4PEEs8hyMGAgxUNOrBYRuGuAmhhtFHfxyjSbG7FMeymTl7PLtwyLeYdt54tnWsawGUdqjhTnN6QX5FYCC1LD8Gxz1/f7hnf5mbQ5pcGgxdfO7ERbl3XeM7cbLSm3mxoTTC5mgXPQo3aGm4ww7bS6AoCbE0IHlNjzicgbT+fRge0oPgLDIN8WHlHJkkmVDTdqBmnU0WMxuiWs84+B+5guH3IddQM/eYHuLzIEw6mf4gkRFMin6u0juKYM3cxSS1tNy+Vx90P+WEdaPMdW9UWuLh9HnRO37K4d6qwpkm60d3uIY7D1nqVqyDeQqB+Vgg1uh2nl/hWQlAVV3parknc7TVh91FjFu7rst5rPTcCuPQSmFN1hlgRE0YYUM1CAMeFUL+Xu1zJ2A04O8C8h0VupZ7Y7wCgKURkYnkWpLfVtZ9JRP9ycfFF6xbHBZbjQXMQsWZnKbKduaZ5Z0HPWDrCVgsNyZs8YZSBgR+6Lha/N/mdrHGUvMPQi
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(366004)(110136005)(4326008)(66556008)(508600001)(64756008)(66446008)(66946007)(66476007)(76116006)(5660300002)(52536014)(54906003)(2906002)(91956017)(83380400001)(786003)(55016002)(316002)(8936002)(9686003)(6506007)(38070700005)(186003)(122000001)(33656002)(7696005)(71200400001)(966005)(38100700002)(8676002)(86362001)(21314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iJOwiynz+eK2RjkZN3DEDUDalYXfCFetQA05idN9aSIqDP0qAeyBXDQ+6qQAXRY4x1Z4E3cMXeIfHAyjhOCFYhXiEbqpUpCnnQ3X+qQuglQCcEfYGAdeZMtTkcg0q9TX84CWtNRv2OAWoFBaa+ODvdBIL/gkzSGVQF8dNxZu0UobJfRQXwM7djMG4DrfXg1KwOQ4D2vo+y61coPEck8D/zoEo1O0Jh4LCpKAQgBE4GaDDeZkVdaH12OmWp07P6P3+4cPkZnBPzibwmUCFryZjsnF/GfJxqzONzeB9lt9fctO6mp6zWN4FsShCZFwCjdNu9E6Phz5LTapCBEfd/mALt8Wwgnv+HntMLoBydIt9/D9bGyVRkMq7XK3g5QXLCZiCWs+QR9FxAGzzDqaDqnOQ55ATThJa6epamha1pYV6wPo8RP/yJRA0g0M0SCJpRI9yyPgFdUXJh+q3f8pmwtXvc1ywTF5SytohLjtvZ3fUVzLCXMgp6x5EFmew=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: uoguelph.ca
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: d69f2d86-269c-4982-d97f-08d994d5e850
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2021 21:01:09.5213 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: rmacklem@uoguelph.ca
X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR0101MB1624
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/4WH9TxQJ01nip14Wy38p0AR3zLE>
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 21:01:19 -0000

Thomas Haynes wrote:
>David Noveck wrote:
>>
>>Section 15.1.1.5 is a problem, although, as Bruce points out, it may not be problem returning NOTSUPP in practice.
>
>
>Perhaps the solution is to add a per-file system attribute to state whether or not it supports the optional feature.
That would be a lot more bother to implement in FreeBSD, since the nfsd only knows if an operation
(VOP_xxx() call) is supported by calling it, and there is no convenient file VOP_ALLOCATE() could be
called using it to test for support.
--> Yes, some new FreeBSD specific pathconf values could be added to do this, but it would be a lot more
       work than just translating the error return for not supported (typically EINVAL in FreeBSD's case) to
       NFS4ERR_xxx.

It also doesn't deal with the extant Linux knfsd servers that are already shipping to users.

rick




I'm thinking about updating this definition in rfc5661bis-03 together with dealing with a bunch of the remaining erratta reports and a few updates to the security discussion to respond to the changes in security-03.
I would submit this right after security-03, even though the big split up of the bis is still a ways in the future.

 I think we can spend a few minutes discussing this at the meeting next week



On Wed, Oct 20, 2021, 10:18 PM J. Bruce Fields <bfields@fieldses.org<mailto:bfields@fieldses.org>> wrote:
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.

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