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

Rick Macklem <rmacklem@uoguelph.ca> Fri, 15 October 2021 23:43 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 2A9D23A0EDB for <nfsv4@ietfa.amsl.com>; Fri, 15 Oct 2021 16:43:22 -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_DNSWL_NONE=-0.0001, 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 ZSE3BbPIHU_J for <nfsv4@ietfa.amsl.com>; Fri, 15 Oct 2021 16:43:17 -0700 (PDT)
Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670080.outbound.protection.outlook.com [40.107.67.80]) (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 657FA3A0F0F for <nfsv4@ietf.org>; Fri, 15 Oct 2021 16:43:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b2iVkl54LWz+323y5iiujEnOlCkbMlWjqgrviaz3i89m1szn+2oRU96fBuh6NcA+vuB2rokYOE8JpvHQyHRJp/4vw4e39hu/mEh5DVwooh0TZ5xjUOQSfMp9sgqj2Xuro51ie/+tMPXjfZmzZIuHOQMoV5L2FihCSjhifDisZ1n7qHjnAR05gxC+4FydtfcWy+kNtnaD9zjzxDP/+WkhGFrJZpRIdbXy052u5xP6hwQshVONuADL5fSqO7/xuxXttP1NWlpWKdh3GmyHH5H4jE8cEfMKzSOyW3FwNny4AmEIT8Ne9dTc9zo++HKeuiHhbLl9ZTrrfI/lvQ01oMajTg==
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=ZGB8F3/A7Xzvz8IkKFW4f8ziZOJlG5PyiFCMBK2Foig=; b=RvY994OPOZOWsQcNz0BBqhjWF1yGhr9Mi2LFC9qPbw34nihqiBtyDMakwmnDCktZcQJAJkfWW4YD3N9nyY/UBgtWlRZ7Vw/pBztMOPxj7wJ0rzJXu93kp6WnyGUstBAgURbHKnzfAuPg+c3Xy9bR/KJN40V+yv8/Uq3DtJIusUpl9RwFkb2KWs8lu6AlO739bbeiit94sq0Z5C1/rbf7vMolnp2g5WosJdpI3NiP6eoraC7woPF/Jad+ObvnBrlQg7BntHK77Y4IxWXRpjTyX3VzhQuZBhmH8I4VJCoWYqJ7cxkKIYWhJSnZXu6CSX4d8KQkCMNsjvIJJ57v2w6M2Q==
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=ZGB8F3/A7Xzvz8IkKFW4f8ziZOJlG5PyiFCMBK2Foig=; b=j8RxSPuucK9O7Tti9AKfI9VSlvx5jIPbgEAPN4Zr8ln8e6X/CJkQrTL6rsVw+E6+k1gfNaQsV1ubGRg+XWNdpufBYYDC0U2R96qAUbw1ZrifCxhJNGrxNZTLUbj80IKdJr0SPOpGAKOcUnkz9cJj3z4yU9nRw9SPbTUiLOU+GuOVBYCvgat77tS5XnsexWABt+ZRoJRRUKWoItFhoC9Bm9/gXNE2s1Z94FwtcSjgp5epQYd2Qwxk7YJCnE0YleEje5pX8lfXQ9t/SXHH+vVOmpfasZy9rghXrbr4eMahodyefuag5v+1thxL6niiLKAIcrEXVIzlhrFPSIC+jWBZ2Q==
Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by QB1PR01MB3121.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:3f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17; Fri, 15 Oct 2021 23:43:10 +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.017; Fri, 15 Oct 2021 23:43:10 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: David Noveck <davenoveck@gmail.com>
CC: Thomas Haynes <loghyr@gmail.com>, 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+Ezkai9otM7Jmjk6vMihAAgAATSmeAB09jAIAA0zIc
Date: Fri, 15 Oct 2021 23:43:10 +0000
Message-ID: <YQXPR0101MB09684B8F12901E7B0A796A97DDB99@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>
In-Reply-To: <CADaq8jcN5tv7RMOY=_1BktUsWkqEmUy-w2aygiURBNZC9LBPDQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
suggested_attachment_session_id: 4cd0a5d7-5d64-85ad-4d96-f8d47b11ad4f
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: c039f8ab-1d65-4b7c-4948-08d990358c1c
x-ms-traffictypediagnostic: QB1PR01MB3121:
x-microsoft-antispam-prvs: <QB1PR01MB3121FAA3E31EF18E985F7FD0DDB99@QB1PR01MB3121.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 0P794qSgp+CLYDo5mj4wuVdEqZmDn3WLK0lEflILLxKdachAi/J/w7k+kysJNfQkloZd30gyIg1lhd8gtPF0JF0L1h8+1ccBEiogLk6jGyHZPXvTlb3Qr5P3YnW9ELLb9Zw1YoQYNnBnHDYmlRXKEOkn0+u/vaGzCxX48YVEXsVpxKyE0lqF8RkvrFZle9NCaSX+8mZemiCFa31GHH67/NlORmwsRfxP37ksQ+oWKG7cWJuzu1VYwQQUO7Z1A2W9AvBE4omApCebZalUPEGjvjzUwgs+xIoJzs2I+OG8133JM45V9o4M4o3sXCQIsv+k64Rh9mbfLHRM+CI80MnF5iIctAlpdMRo9JD6LzvBRmAw3qJzUwfe5c8FOhCbs6fMT2nI0eXkvrr4V/U32ABK9imLd01+J2UXh11EtJP+vV6BSupHnsG8Cki98cbz62akRv2owC0651h7jGEGEBTuK9SvMoemmTxi4GTBLCLcQ0FCURfySxLm/ZAOYIOn6tHcvNfKV+CQq1jVxcx6pA8l/RMm8oO61x0rNMbFcs45mbLrKIi1Vj3C38U1B0X7PKKsgLXAF4fa4AWCJ0ZmKiGZcsnV7QTxm1Y3+A1P2WhsDzjPrcEIzkpEICZZkluOyWltGtkhcfvUsUhPDuYEGp1g/QDWBt7Qe8H0AKrFm/t5rfRNL+PBqE5NqShA1AsdaBpvAtGAm+mVRTLl04bt4mLWHYgqP5YuJ0pyk9YK1CHMuG1s1FlKvHMZ5cInwwrmkuQefDD8kS9BXX0vH9wQuxD9LNvZR7+A0rczSciA0FIW2Ho=
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)(55016002)(7696005)(83380400001)(8936002)(52536014)(33656002)(53546011)(122000001)(9686003)(8676002)(38070700005)(4326008)(54906003)(38100700002)(6506007)(186003)(64756008)(966005)(71200400001)(76116006)(66556008)(66946007)(2906002)(66446008)(6916009)(5660300002)(66476007)(86362001)(316002)(508600001)(91956017)(786003); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: obGHzDvX/dWmw91jazyQhT43VxNSaYVxZ+1RPH0QBQ7uwsqSU+3w3toLnoAqRvkeM4+AAcXNpIsRZX0/Gq/vLRWiFGROA7tyQqFtnmVOhQzYnPfViiV3TKhB5EHDuuLbRhDKRApygzAE4OOIOXimTRh+MV99zy+vYP+x2ay0ox9z3dE/3wr3FwbciI3G+T1aQETV5Im6hC2GiGSi4140WIjVjZc6H+/t/S2bEhttjo4qA6n+1XfjgeSav80tGkz86XOrUNU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h4BggvoY56HIsgnc76/Y748JN03Q47vfL6g/1mBMKC3ZVt2rm6iZIEhuAC4OLXFhrQE6SC
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="Windows-1252"
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: c039f8ab-1d65-4b7c-4948-08d990358c1c
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2021 23:43:10.7726 (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: f3ZccEfo7fTZYjUgl1qtV/tRzhmn8diu6PltxPJVjpFKbdKPc8tx8DNXMnjfDUcK4J6dn82Kk68gu7iBasJQAg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: QB1PR01MB3121
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/-jcBdZCeqmJO3afpnH3uqqx66FY>
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: Fri, 15 Oct 2021 23:43:22 -0000

David Noveck wrote:
>I think the right error to return in the case in which allocate is implemented by the >server but not supported on a particular fs is NFS4ERR_SERVERFAULT. The case we >are talking about is an error that is not otherwise provided for, just as the >definition of that error states.
Just to clarify. Are you thinking that a return of NFS4ERR_SERVERFAULT to
an Allocate operation should be "normal expected behaviour" for a server
with a mix of exported file systems, where some can do Allocate and others
not?

rick
ps: It should be easy for the FreeBSD client to map NFS4ERR_SERVERFAULT
      to EINVAL, which is the error return expected from posix_fallocate()
      for this case.

On Sun, Oct 10, 2021, 3:33 PM Rick Macklem <rmacklem@uoguelph.ca<mailto:rmacklem@uoguelph.ca>> wrote:
Thomas Haynes wrote:
>> On Oct 10, 2021, at 7:07 AM, Rick Macklem <rmacklem@uoguelph.ca<mailto:rmacklem@uoguelph.ca>> wrote:
>>
>> Hi,
>>
>> I'm guessing the answer is "no", but I figured I'd ask just to make sure,
>> since RFC7862 states that operations are optional, but does not clarify
>> beyond that.
>>
>> So, if an NFSv4.2 server exports two file systems, where one of them can
>> perform the operation and the other cannot, is the server allowed to
>> reply NFS4ERR_NOTSUPP for the operation when attempted on files
>> in the file system that cannot perform the operation?
>>
>> Thanks, rick
>> ps: In FreeBSD, UFS can do Allocate, but ZFS cannot.
>>
>> _______________________________________________
>> nfsv4 mailing list
>> nfsv4@ietf.org<mailto:nfsv4@ietf.org>
>> https://www.ietf.org/mailman/listinfo/nfsv4
>
>
>Hi Rick,
>
>The answer is “no”.
That's what I thought.

>But the question is very interesting. NFS4ERR_INVAL might be the most appropriate of the allowed errors, but >pretty sure you do not want to be returning that.
Yea, EINVAL is the correct response for posix_fallocate(), but the Linux fallocate() uses ENOTSUPP and uses
EINVAL for lots of other things. Since returning EINVAL for a ZFS export was flagged as a bug by testers
during last week's Bakeathon, I'd agree that EINVAL wouldn't work.

>Of the not allowed errors, I think that NFS4ERR_OFFLOAD_DENIED is closest to what you want. You actually want an >NFS4ERR_ALLOCATE_DENIED. It would mean that ALLOCATE was supported, but not allowed for the given file.
>
>And I have no clue how easy it would be to drive that into the standard’s body any more. :-)
I think I'll just have to NFS4ERR_NOTSUPP for Allocate unless the server knows that all file systems
(and DSs for the pNFS case) can do it.

Thanks, rick
ps: Tom, is hs-anvil going to stick around on the Bat VPN for a while? I have a client side race/deadlock
      when testing against it and, if I come up with a fix, it would be nice to be able to test against it?

Tom

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