From nobody Sun Oct 10 05:57:32 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 32F3217E84BF for ; Sun, 10 Oct 2021 05:57:40 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660075.outbound.protection.outlook.com [40.107.66.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HRrn00Bf3z4nGM; Sun, 10 Oct 2021 05:57:40 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CUoRNgzXATdZ67NEe8xNMBVSKNuqHGF2t/us+VrjWLpQIThuqQBhwiS3Pv/+9fXDoxltT1urtTFjDzBevHRTc9mGJPxCn+bDx/Mybs9F++2IJVUTyBCrxk+vgg2Ys13UbTlWKf66aH/b2sfuwsXo5T0rwy/sxr5CuSFAobsvAMcGAwfMapgtTkYsRnZfLh2ej7oy26zBVCKLQ69H7YNyBXeBsegjae/pQZz8nCF8WLfJRJ66jxIh8tAYq3jPxMN+QrvCMlCcHlAhgCrVZK6wmfJ0rGPT6mekUP4fgMuMbRYjG9Y7mARVuCEHRigF7Bz9f9+pitLQspMdmQO+x8GCRA== 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=ATVtcc/GGBWiUeKrItKQc7NdPcoLzwrGEpIxGklBhKc=; b=m4S/K3t/LE/R+9p+T6z60lunxVzK4tOfr+k2zc+7ZThbVn7ixqubkoYLqxeYNZdBMACnr60bPUI4Dz0NsSjKzYmuH45zZYkkHtzYprboU9vDYMOrU/Kb9nJEobt75QWIGYbg05OvbQk34Q6v/wnF+YXFP29gwd8rzcuN2oOz+Rozm2zOvZsOE4dbqONy8g0EOB4WO1Zh9XyV9fhAxSNNz8xWzU9OPv9kGfkUscq6E2SKoSH2cBb8HswHKjYPzNOddJhrFs0dPmLtnEH25cifIEIZ8M2CgcIW9A0i5NDVQ8N8xkvxRw3rUZjEo4RsHT+Fm+AZk/KJtnFzkBpMmmYPnw== 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=ATVtcc/GGBWiUeKrItKQc7NdPcoLzwrGEpIxGklBhKc=; b=p8eJKVsOJmQJ5eNgPNZFbOKcb2l25B1jj4YkvRP9WKqpfoDn+u8fZ4uTuHQC6dhflUAG/qXao4ZDQyWqPUY/vlIJz6QJ5ZymRGEtpU2LcBkIzAK2MMyKz44/SVQ62XgPWHjfCeS78zfxkuR7czR/vqQg5m/K4iFLXTjJ8WD5/S44qeD7Th13cUtYDQfBdM1+6BRWlbHr0nzOy8msOwwjahD3JD85lR09RY/HPTpGxadX+rTcLOsF7evD+O57/1mGgrvBkjYg9HpYwGdAHIiIUKYvpowuX+pZQ52qOtu/WTYlUCpfeKcCzYEKirWlkfSOVnqacRwWlktE4/b7Du7jyw== Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQXPR0101MB1623.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:1f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.19; Sun, 10 Oct 2021 05:57:32 +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.4587.025; Sun, 10 Oct 2021 05:57:32 +0000 From: Rick Macklem To: Alan Somers CC: FreeBSD Current Subject: Re: RFC: Use of VOP_ALLOCATE() by NFSV4.2 nfsd Thread-Topic: RFC: Use of VOP_ALLOCATE() by NFSV4.2 nfsd Thread-Index: AQHXvXMbM0Hsf8N9W0qQA3mOobhhb6vLmYKAgAAg6Cc= Date: Sun, 10 Oct 2021 05:57:32 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 50de8601-491e-aa72-1ead-c62be075b830 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dc38fdfd-a6a2-469e-3d8a-08d98bb2d9cc x-ms-traffictypediagnostic: YQXPR0101MB1623: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yAAzb6DFV1lEbU9q6LvuNh1PKgPp5TBd6aRwdY/njgFgRE1Vdzfr0Msa6IrhRr1g8qZljFeu5lmj19qff30a3ITT0Fqn+X6bAoTPK0vZ9qZPlNn7+R8ARzKx+a5IDdHyDCvB25JTKvbtvhe9busjYYZktuxy/pcKJsxni7BNWnVsCU5C6pGEvLIgymwwGKgC7NzvjG9E948ciRY4JW/lH6Ck/HCjn5PJY2hNuuexM2wrgYx820kgCqeXl3aI0YlYzv9gCrFbTOMqufunG7OyjbxskleGYU0fa4ItTjlSW8cMDRtt5MJgJIG/WbeyEfqD/Ly+0ig1M6VQJFvVVqQ+P8pLG51k2rC/kMgpzlkg/EQubchwBdCGeEHBiOg9p8cb6tMWYOKIwE1cVjVU6//PTQC4n2snZrga1NPx2BtU+kg4rAne9G3pUaZmmpuL8WKx2WqdxzhtbCjJVxUR5mF/f4+xBjxCjXdH+ah9zE7ecCQwX3Tu+WesI3hL7ZgDaUd9wXrJRWX7aoxxmyEkc3MTTpCU0sRpGv07P4Wim0TE8uJaEpL8VyXIxHnOQ2YdHSfAeUyFTvwye5ZAzmbSpg2us6O2QNx3bkL7Ry+YnxtEJo/QiMjSrcWt5KBq2i3GIwUN7UPfmNZ4hc6yVHOVGyGxRfcyjwBZVY706aN9sRM/9iBvEEEHkLCz0cPZ4xEw3lEIAV6p0XLLQxIH2pKBW8x32g== 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)(7696005)(52536014)(450100002)(4326008)(186003)(6506007)(66446008)(8936002)(33656002)(86362001)(55016002)(9686003)(122000001)(71200400001)(38070700005)(64756008)(91956017)(76116006)(8676002)(38100700002)(508600001)(5660300002)(2906002)(6916009)(66946007)(316002)(786003)(66556008)(66476007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?JP4DPR98lHXkyhrleVAZaWasQxDFFlWFj7TiDwaJm4P2RF4rChNxoG13UH?= =?iso-8859-1?Q?6lN9l0R4gcVA2WfvFL+RQvVzMFrtub/Tzp7i0zoMNrTPdxiJPIxDXI3cuR?= =?iso-8859-1?Q?9idAPRRtpCdHR1KpvYl9YQvyz2Na29ap6jUC/lmgcx0WA0/ohDhEOLFs6I?= =?iso-8859-1?Q?SOApfAhAhUtvgjwmeLAtNf1LkDjpKgLWHYDd/K1EiInBOSea+QELF7Lr8o?= =?iso-8859-1?Q?u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j6NNITSIXxYiPIA9?= =?iso-8859-1?Q?BkFPkqZ7L/hqtj8HiV7pAS2eeur+QeL1HHzTCQOJaH5281ah1lUNedoECc?= =?iso-8859-1?Q?Q49vYyFkk9eE+KXkhIu8m0eHxtoCv6XgvbPDrohtTwGGYC69RcCNlZwxAx?= =?iso-8859-1?Q?n1GcWDKpj4fSwB5a0DOySEpTC7SDCYl0vPIOwZK7g4zRImMx9dNVHGviQD?= =?iso-8859-1?Q?kjrcuS8AhU73aTHORxhGAdg61qHpdYH6l75bipTapQj8zlIcUJ9KY+g8EW?= =?iso-8859-1?Q?pjCuIOMOQDAQ6bTzTb1iKOz5UKy5R/IvzmXBnwmkBAHDnuzTgYLZ1kifg/?= =?iso-8859-1?Q?lDxS2ssm2lGf54Lk?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org 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: dc38fdfd-a6a2-469e-3d8a-08d98bb2d9cc X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2021 05:57:32.3496 (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: NgHmQSj2U5HrmguaM5XH3lSVbs9OhEcQr9a3aF/uiKm/DpXG1FMw256zlbYHSIdwVUMi7LfTTniGosREgh5OxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR0101MB1623 X-Rspamd-Queue-Id: 4HRrn00Bf3z4nGM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Alan Somers wrote:=0A= >On Sat, Oct 9, 2021 at 7:13 PM Rick Macklem wrote:= =0A= >>=0A= >> Hi,=0A= >>=0A= >> I ran into an issue this week during the nfsv4@ietf.org's testing event.= =0A= >> UFS - supports VOP_ALLOCATE() by using vop_stdallocate().=0A= >> ZFS - just return EINVAL for VOP_ALLOCATE().=0A= >>=0A= >> An NFSv4.2 server can either support Allocate or not, but it has to be= =0A= >> for all exported file systems.=0A= >=0A= >That seems like a protocol bug to me. Could this be fixed in a future=0A= >NFS revision?=0A= Who knows. I don't see any interest in a 4.3. 4.2 is extensible, but I thin= k=0A= this is now "cast in stone".=0A= =0A= >>=0A= >> This leads me to a couple of questions:=0A= >> - Is there a good reason for not using vop_stdallocate() for ZFS?=0A= >=0A= >Yes. posix_fallocate is supposed to guarantee that subsequent writes=0A= >to the file will not fail with ENOSPC. But ZFS, being a copy-on-write=0A= >file system, cannot possibly guarantee that. See SVN r325320.=0A= However, vop_stdallocate() just does VOP_WRITE()s to the area (with=0A= bytes of data all zeros). Wouldn't that satisfy the criteria?=0A= =0A= >> - Should I try and support both file system types via vop_stdallocate()= =0A= >> or not support Allocate at all?=0A= >=0A= >Since you can't possibly support it for ZFS (not to mention other file=0A= >systems like fusefs) you'll have to not support it at all.=0A= It does sound like not supporting it is the best alternative.=0A= =0A= rick=0A= =0A= >=0A= > Btw, as a bit of an aside, "cc" uses posix_fallocate() and in weird ways,= =0A= > such as offset=3D0, len=3D1. Why, I have no idea?=0A= >=0A= > Thanks in advance for any comments, rick=0A= >=0A=