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

Rick Macklem <rmacklem@uoguelph.ca> Fri, 05 November 2021 23:19 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 1BF963A0BFE for <nfsv4@ietfa.amsl.com>; Fri, 5 Nov 2021 16:19:39 -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 (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 gSEzEk7Lrt87 for <nfsv4@ietfa.amsl.com>; Fri, 5 Nov 2021 16:19:34 -0700 (PDT)
Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-to1can01on0611.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5d::611]) (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 0D02F3A0BF0 for <nfsv4@ietf.org>; Fri, 5 Nov 2021 16:19:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hbP27LmLHlrC7yn0hkRd0IVpSKzcmq3ns0itW/mIMufl9Syy54+NcsIx5BNnPhpVBjRjqixbZTxXMVjaQpfJugWte+z0xfqljbHGyZ9fqI8SBaGlcpI2Gj4pq66dLaUYWnopjoAK3oZ79pSIUtPRTl/jcyIjtuznY/C5+gPiuT5gAA+SGOV4YmtMCavMGoPkJnfBg6SapOCDC6CKcF0/7KB4HSGGjfyLP5F5MKVn7BZZVwUB+fpHPN7mYqYhIN2tylbruJIBEWiiv8EqQQTGRqa2WqP/XqNIM0tX0PWFuPm4qxPvqY+racQOyyOIAyEk0OnPAUiR9ASBO/vPRt6nrg==
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=gqUcoz1JlvWFpjFJqxCp3yUk2vMOgB+DQPXlAlSxRtg=; b=m6QNrAHyxrqhgZBh5EFOrH3GGuu8i4qfdJHjQxWIZ+LIUJcP27XfTbXY6dHJQueD/4oNnGSB4som3Qy4n11Yk25pPWZ5l7HopYPmHnh0NzyEzGm7qODwZzgKko/qgYyvVcI7l+SmuXL70CaXL925gdzlTZr2TxGDcnUEBXDNsSamgC5YcF7RlfpKVbzcxSQ3uTw+udx0zaL5pS4/7OsAx2wch/ll6vZ47nESAERpfVRjTACdkZ0WEZX5Gpmou/7FPdg8FaZ7wV4LMXVW2tww+l8zH/C3La7Dafg2j5zEWA5gtFTlIxuLIBDthSmpDUBcepV8+CogeNA88I5foyjxcg==
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=gqUcoz1JlvWFpjFJqxCp3yUk2vMOgB+DQPXlAlSxRtg=; b=mAMzfSFgvLcqw4gfORtCOnbMzIAZOf5yqpvbtrbIIR8CZ7fn7SMbmfhOw070ZV6xY4vAZxvbHgc+wmIN6pzVO49QF3c45YWUfSs2taygEPHBPLOOy4pkqNz3QCfqPdcQSar6DoY/a3CRYBD7bYmDcsFv8gJx2UIu0yRUzUZGFhobiE6s1QSXQ3tKgkdIFgPri09Hxkwl+cnygYkgoQ3C2AsSgBkUs5vkIFkpK1CAizz3jj4L7Dx//hCd9HOB3BPHfR1h9vloKaJll4FGJUaQ+H+imF+7MLtubVvDD5rTjSNeDDMJ4rSrge2OLfkzL4gp2sIbPuoLWT7UBTF/aPmqPw==
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQXPR01MB4406.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Fri, 5 Nov 2021 23:19:29 +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.4669.013; Fri, 5 Nov 2021 23:19:29 +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: New attributes was Re: [nfsv4] Can NFSv4.2 operations be optional on a per server file system basis?
Thread-Index: AQHXvd+uy+0ZXP+Ezkai9otM7Jmjk6vMihAAgAATSmeAB09jAIAA0zIcgAXsCICAAfPukYAAIGiAgAAH2QCAAC24AIAA3ySAgBfg6A8=
Date: Fri, 05 Nov 2021 23:19:29 +0000
Message-ID: <YQXPR0101MB09684DD5D9FC42552F2DB9E8DD8E9@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: f4202444-9f56-9365-ded4-8249c28f5077
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: 2f98011f-78d3-4a0d-af2c-08d9a0b2b772
x-ms-traffictypediagnostic: YQXPR01MB4406:
x-microsoft-antispam-prvs: <YQXPR01MB4406741B5C6A96517E7FAEFDDD8E9@YQXPR01MB4406.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:6790;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: bb1CrenqATUCgwjMdNib9tvwKyMGmcoKUuA+ECC8TJtLoKNJN+oRiulX6wyGyAyN/AYri+Nb1m9b+a1q9xghgAydhWi/NZ+t3Nj1+DMtYV0YJ8uSolQW6KpdqNkD0ClztkG+K3JjPlmgYfEmFj5zwzFt/Dz9DLoNgMUHrrQvq3ErX6OejvpPPLgp4LT5F1nzC+/+3XmvNzCySIuASR+zD52BClrCT9qAOK3N69NMrvn8vztKXsTDUDd8T1y4nrgvJzIg0XrIiXjyg9tVG33/TTWxjpk46D6iXYpJPqZ9kGAm2uEB8C+0qM4PC5u5i5Tm6wLm9YvPiR6JIiezZO7Mse3jgMnERupxi7z2yT9IhKOraFOM5bImz0DPZH1kCdf7174I0eapOj3KQUQJtu9taZ48oGElTnNtNPCE9R4A9B7dgmqHWXUW1HyH8W94wqX5cJ96RbW3WB3r3+Pa6mSSH55fyBXlhYrtkIsnjZNWqTiEgbatJdPn83CsyQ8ohMLi4o0Nqbgmh2JiPpRvfkqt9j0Uvj3f0iJmvoq1464hDMDkyt6DNiL4O9kBSdZdFU4SjrKlp0euaRD33vxKiyqaE4PXjgESP/tUmtMnly+HVRRErmy9pZJWd4hB+ntQXsWzsW3K0di8DTk2SH99WRmq/eL3R5572OkKvJk42VYt/2iDTu+6IpYAZ8k01hFBeEQxJIT19dbCdYGO84dIiAWL/JZuQJj8yDtGJ7hMPryUvAFHBDgrzqI4f2f0+DNQIcNv+lJZJ4gj8Y18W6RLayrgIaxg/Q0aqk4nv+czsu25q0E=
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)(86362001)(316002)(786003)(38070700005)(66446008)(76116006)(91956017)(71200400001)(5660300002)(64756008)(55016002)(110136005)(966005)(54906003)(33656002)(66946007)(66476007)(186003)(66556008)(4326008)(2906002)(53546011)(7696005)(508600001)(52536014)(122000001)(6506007)(83380400001)(8936002)(38100700002)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EoDUwdVTlq8pxgXZJ2nx4S83tWa7N5y0YaSJwbgA+Ppg71vMgZtMnONAsCINbM5VH2RdN4bk5mNTBTRu7aFNo5Rr67/t6Zv409MWWcCd7VXMUiwfMBEuz0wxBNl+BCJQuYFRcIG4v4qs9rC6ND8ATTh3EIF+ocPB0QPcq21gDGM1CV4todkp6pnh4hULjL6sxNIKcijBOSLI0jG7vrTvnko9Io/3fgvRLPxtAryNfcS/yDxDv8+isvT/DaclatJTgnS/488XHUalD99q5nTeKEnEFKR45JtsCdo96OPx2Kcm3RIIWfNENzPkeDBoA1nB6hLPtHYg9yPeGR8WB9GF7NC95Qyc2bVMOuO/sUM/WA3Fbd5lSiTEOtkGwDl7AjU2yJ4wECu6icJACDJ115+KGGoBeK6y1OPYC1W9C/mltJZPAjCXy6LwXu90sYhrVybOFk61RRNBlp5VAQkjlXhaVSMe3NCHJGNfDmdwOOtEi1RNawE9f0u6BX0/c2rvj8QmLKmMQddQicKt9dlO0xQfLs5eRTG9yqqeWDbf1Lt3haGoSijpY629h5dH03tWRlacknpoqtd/9G5ca5jolIXk9VP0xyZhMMb6vt/wVYEEfo3tJqDo0uTsUFaYBTpFl7rFf8Vl5hFXwAfToPTay/blZ4rORKdCvjRF3VRfpw6V2239tzt1Ieg==
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: 2f98011f-78d3-4a0d-af2c-08d9a0b2b772
X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2021 23:19:29.1095 (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: CbUP/U4eNvm09FVfvk2lfujOpT9SrDpXdiqvGaAwewRFRq1XZPqW4tSfcyn0Qi3qfgNOEGLgRq/oo4Cg8QspOg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR01MB4406
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/kyvqAAlTtKKpOoRdAe0jS2gvm80>
Subject: [nfsv4] New attributes was Re: 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: Fri, 05 Nov 2021 23:19:39 -0000

Thomas Haynes wrote:
> On Oct 20, 2021, at 10:02 PM, 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.
Although I still feel that an error reply is the more "natural fit" for this
issue, I am not against a new attribute.
There are also several other new attributes I think might be useful.
Here's my current list:
(All would be read-only, per file system attributes)

counted word array (like supported_attrs) - Optional operations
    supported by file system (a bit for each operation, based on
    operation number). Still could be useful, even if a server reply
    error for "per file system support" is agreed upon.

uint64_t - minimum unallocated hole size - useful for Seek and
    maybe Allocate, Deallocate. (FreeBSD has a pathconf variable
    called _PC_MIN_HOLE_SIZE, where
    0 - not supported
    1 - supported, but no fixed granularity
    > 1 - smallest size of block that might not be allocated

uint64_t - largest extended attribute size
    (I am planning on a separate post w.r.t. large extended attributes.)

boolean - monotonically increasing directory offset cookie
    This could be useful for client side directory caching and
    client implementation of directory delegations.

boolean - server is doing mandatory byte range locking
    This is needed for a client to correctly do file caching when
    a server enforces mandatory byte range locking.

What do others think?

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