From nobody Sun Oct 10 05:48:58 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 0C72217E6207 for ; Sun, 10 Oct 2021 05:49:12 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670040.outbound.protection.outlook.com [40.107.67.40]) (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 4HRrbC68q4z4lBB; Sun, 10 Oct 2021 05:49:11 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EO8Nuc/xWHRpj4KdqkduGgeIcT3JbC5AsVz3Ws1agV91iJmkoXD0t4YDmavUkUYxPLaOmbXGO93yOQ20qTPWqV/DMbjl0LwMLTjIBHhqnl4rvHSO/y4Te8LEXWvhgXAAZk3NXFggR/qwLsoouuyYDIUIHQS9VHGc7cySI+V9zIQEhBrXroPGRqsQIeKhh3w6u89RbCWF94tzNIMcxP1QxHucRV2YMIqWrIuZApl1IMko2u69YhXbrExrqMbTHoy9sBTiDJRrcHUdfSDLIBFlslh7zUv/rWuiGxlzs6z3uPghxHLGSRbpuy1ZFxrEnOvjG0bKBoyXh6pEXOoNE42dWg== 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=KCgMDNCqx7aUHaUbZGAGENipF7/nNMYqFFZPH97tYRI=; b=YWsCkz2lQjqYasYv+gXhJZXlK+oSDyko6UVg8QHw3t+LdjaG55M2S2qhppOgTcc6/+aFroG7T3Yu+n38QBgMK25ZlRqo8jXGWwanNMbbNVO43+bF7n0/24lAfSuPVDbr0QVWV5QkGnpwOLpW84EpSu3SE0cNwmbQNjg7/93iocgEaDhEXvNtxHThQdno5zpdpXdFMDf3+PnvzL/28c1pB4WXNM4EmPG0E1iaKH+qruSyeBH9oJHtFY7ZsJbNKXETMnmEw0B1rD4h6ym05efTry2JDxVoXkAsmduWI3mOC5zpEsXLK+DiQVDUp9zV9X+wwYZs6zqadc/MF3RIR69hMg== 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=KCgMDNCqx7aUHaUbZGAGENipF7/nNMYqFFZPH97tYRI=; b=jRYKNkDmvDePvGcL9YpuozmflMMJQ3uww3b3XVqgzBB8OnbJePCUzV+Rc5OijGOzQRFrVcOkkD87MZjASlV19uiAuuvUmK/aD/x4qkQSVHb6x6jNbz9QQS9vxspisQxbzKKJvOCXE5jqOHJPltK9jONWwdjVT/s8u15OIS/hnHrVZxuiYh//yiOQVhG9aeaEzrFauJq3uJSol8njeqe6LrAtq6+7NB2akpj7LBTpQDmphntxSH/NEpuPuSdQje/h/z1zx2BfjovzZ8OQUmbE6K7mamt0qM0mX3M3XvsiBWkChoWrmGsvQlaMFUHCoyNuFvDWURoETxKgYWabmUk1rA== Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQBPR0101MB2082.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:f::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Sun, 10 Oct 2021 05:49:04 +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:48:58 +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: AQHXvXMbM0Hsf8N9W0qQA3mOobhhb6vLmYKAgAAgm70= Date: Sun, 10 Oct 2021 05:48:58 +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: 44c6e91b-d802-7831-4db3-d209c52cedcc x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a45acddc-1864-46c6-373c-08d98bb1a765 x-ms-traffictypediagnostic: YQBPR0101MB2082: 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: KNt2I2zLdPgh03Zlr+FLseQS/26kNag/JHi0dFa12Y/dyXkhdI8TeJmH39qJSk9huWpMisqxh3WhRoV1VppKJnZ0LN52TaWLWmOOWYSkBvc5EN+jrdZubEyixv/REuy1W059E/YYrdljRfHcQej09eHbfSxnWMWaF3ooU24DXiWIwmA2FvHasTZNMpT7OrqAD2Jk8kcSTRySS+6Zs92js/EoxTJuolaNfsPU3rgLMGRiLEIKXXwJaId30l/IQf5/cyeZWyOWCY6UXJ89+5pLXSwjD7LoaptUUfBhepf2TB/OjhluduGpMtpUTRvzmnoX1qbEg+BQCDncorN546pNVf092AHnGB6Y5Ka/Olf9qsPmODrn3tStAyYuGmx4HhBFk7A7MitHoK7X2pI+rNUq8/CABczOQZHcp95xnA30r/tBN4es5ZVYPocjUulBPHOeghUF8Id85XvyLN1tOFu9iiaf9G7SKSkAlbHxZquxz89oSNEjh9Vpth/DfkpQs1ZjWjs2FUSZIDTBia/7INhzFnhCcbcXme+IQ6RcfcEzfxDJd9YJLed+2hlpxZSW+Q8AZBsnxcMZOGJq+wQnyg43pyTfctlhbAdCOcMcHq6Eo5uIKTwlRo1MiZXtYol99KxrwjwXUWkxSrMtpR2Qb1SVh2FO0btRCaOveQpPZ5fj0iH8F17OumElExcXA45VPaD3qJyw1xmL5H13gr4W99PfaLPS+kOlRQW5haWml7YlDqY= 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)(6506007)(52536014)(450100002)(66446008)(64756008)(33656002)(2906002)(9686003)(91956017)(71200400001)(66946007)(7696005)(8676002)(53546011)(66556008)(66476007)(86362001)(76116006)(38070700005)(55016002)(6916009)(508600001)(5660300002)(38100700002)(83380400001)(786003)(8936002)(186003)(316002)(4326008)(122000001)(586874002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?e2p1n3PeWPZFYk3G6Wm1RpeSgqtexnODBhgIG7hwTwr5Jgqesefts6Mzbn1m?= =?us-ascii?Q?W2o/avMH4UXUSxaPZBAArNerpUAgacNTqar2KwGNL3xKJ9Vi6pq7SVIJIUlc?= =?us-ascii?Q?9m4uptBIyXBck+RXugJOgvN/ALzrDb37PDa33DXlbAgKEhHMtBEoOa8IFuU5?= =?us-ascii?Q?+Mp83p4j9LxGsQEkW3Q4H2mo3Lr5BAPvgVSiB6273QgcY8hlzExeUH06DjJc?= =?us-ascii?Q?VHZv86mJJ4xlERMkruulkI/oRk2fDWKbaZP7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QAzKTCd+M4daoFo5LIuZ3WbnumdqDsBPEPBRby6TzzNpBPxTr3sxaGg5qJ?= =?us-ascii?Q?4UxX/XUg76kvNSFMIHNTk7PWvraedXcfaCGouEeef/trPNLOGq2XxAzP9CW3?= =?us-ascii?Q?j/4V7nJQ3WDXac/bcpnYRTeYVPRP/0RbsgNHarv/wd2C9H/b0Lc40uhOuO0A?= =?us-ascii?Q?RiWkF9CQxMTweq40unAvaZEPdx9AFqaEaP3sXkm+vkMxF47EysZC0FlKFOG/?= =?us-ascii?Q?Wfme6kw=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" 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: a45acddc-1864-46c6-373c-08d98bb1a765 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2021 05:48:58.2616 (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: xn8a8fWEm7guDz/wKxFQ9SJR1nkQvCvtpAr6xVpjde6MVCljcauQHACBCfnhsALzQSfHt8SEn5D97vpzoAQ8NA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB2082 X-Rspamd-Queue-Id: 4HRrbC68q4z4lBB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N ________________________________________ From: Alan Somers Sent: Saturday, October 9, 2021 11:52 PM To: Rick Macklem Cc: FreeBSD Current Subject: Re: RFC: Use of VOP_ALLOCATE() by NFSV4.2 nfsd CAUTION: This email originated from outside of the University of Guelph. Do= not click links or open attachments unless you recognize the sender and kn= ow the content is safe. If in doubt, forward suspicious emails to IThelp@uo= guelph.ca On Sat, Oct 9, 2021 at 7:13 PM Rick Macklem wrote: > > Hi, > > I ran into an issue this week during the nfsv4@ietf.org's testing event. > UFS - supports VOP_ALLOCATE() by using vop_stdallocate(). > ZFS - just return EINVAL for VOP_ALLOCATE(). > > An NFSv4.2 server can either support Allocate or not, but it has to be > for all exported file systems. That seems like a protocol bug to me. Could this be fixed in a future NFS revision? > > This leads me to a couple of questions: > - Is there a good reason for not using vop_stdallocate() for ZFS? Yes. posix_fallocate is supposed to guarantee that subsequent writes to the file will not fail with ENOSPC. But ZFS, being a copy-on-write file system, cannot possibly guarantee that. See SVN r325320. > - Should I try and support both file system types via vop_stdallocate() > or not support Allocate at all? Since you can't possibly support it for ZFS (not to mention other file systems like fusefs) you'll have to not support it at all. > > Btw, as a bit of an aside, "cc" uses posix_fallocate() and in weird ways, > such as offset=3D0, len=3D1. Why, I have no idea? > > Thanks in advance for any comments, rick >