From owner-svn-src-all@freebsd.org Fri Sep 11 21:52:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FB323E7ABE; Fri, 11 Sep 2020 21:52:21 +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 "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bp8cM6m9Jz3fcV; Fri, 11 Sep 2020 21:52:19 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dLaj8gYptk1WZd2mdX8LJbRqZTeIMOcXVjlNL2KkL5nyGR/g6ymSSPh/WPNDmbkdIrW9BkvR+q7kZOt0f8igGudsjCszF1BMdUqss9kEFhbVKcMtnKkyBFY0M47vAxfOzkpyZ6LlXUOHzmbZ6ZU6c2FGC+46FmMTeBvbx4SHj7DlbfoF9RWGDtik3NB0PQVCorxGZyxUKyZM4wOirWCpZoeWdCBBTD9sytYcKllYvmNrs8JEvKSXqhJ/UWmCvRVfb1heYZIlx5ZDmzvDGtGIxt/72j2L2kFTSq1pGDop37rzfNiWmAxg/6lD0wymXIpqd1JuLfgiJEFKd1WgCUF/Jw== 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-SenderADCheck; bh=+V0PibtQLsVFa+UKQSuKO0EFDo/1+luYjAEamADgPlo=; b=GYFKFG6eiFGacjvEht6DErVesqmjYaViqsXVK7UABsIB6n4JJzrfoKBohTa+BEyllLztlT4KR+zpZbdyetlTiA32d+o84ys6w3EaQYgARabdgZzfnMptgVooryVE5VwuoHlWaf+HpHCy0egDpNSW9EoSIfiOA+1SF+xD/M2zFKewKvMr1OjI0SEipS4MRtKRNSXJRyq9cOCUgog5obwfO70e/PxWSASVPAQAYTTRUbOPs3e+gXuNrH38K+5KSmWAGIyTlh1YlKLGibxSmsImmx9r5doIBgoVdQ1e8023/5qLrCGYloOJFK6QHd1zW9XS0ipC9d2dFzsqJn/1R7Jg/Q== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+V0PibtQLsVFa+UKQSuKO0EFDo/1+luYjAEamADgPlo=; b=eYUXJ2rdhfea0XqvX9rUlyELZ+4HvnlQKsO0YRJFPgHu3h3DFRPglBOpYB3LRaGn+0XfrDSWtuESAer6lUQ5fM9P0r1x7xzDgfp4fduuzIklN4ubcJHr5cKH1WGuLZy60uF6lDIBl8drUHbSANF++Fi2FSTUSHzzsUkMANL4xmJixEKdoPVYS7oSMuRLiTGJlYnvV8wNG+X5M62SdA/hHAjbdRrcV1wDRls0+mUdZKEadppeEEGQ7WFa7NffPvL4LC21nfzGydCSEWp2UE5af/Lc+YZuHNUaAiAUUPpB5SMGIVxxs9hJbzxTY/+IdFJS6mZAW5kTOfZCOors1xm8Rg== Received: from YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:24::27) by YTBPR01MB3165.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:1c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Fri, 11 Sep 2020 21:52:18 +0000 Received: from YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM ([fe80::687f:d85a:a0a3:bd20]) by YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM ([fe80::687f:d85a:a0a3:bd20%6]) with mapi id 15.20.3370.017; Fri, 11 Sep 2020 21:52:17 +0000 From: Rick Macklem To: Konstantin Belousov , Alan Somers CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r365643 - head/bin/cp Thread-Topic: svn commit: r365643 - head/bin/cp Thread-Index: AQHWiH0X8pBOJ1Dd2EKX5zw9++b1Talj+C+AgAABEqg= Date: Fri, 11 Sep 2020 21:52:17 +0000 Message-ID: References: <202009112049.08BKnavL032212@repo.freebsd.org>, <20200911214327.GY94807@kib.kiev.ua> In-Reply-To: <20200911214327.GY94807@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bbe03bed-dd42-41b3-66b8-08d8569cf3e9 x-ms-traffictypediagnostic: YTBPR01MB3165: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: llKLmYUvutFOxZ1JrxcsT1HmNRqpk4c365WeHGXZ4HvUqHH7Ri73R5UCe7CceC3UenT/LuQV4YofJSozLFqL0vdYNAEcoLMa6+LqZHOrwNkCWizEqqpWNpDjjX1ijd6Vv2d/BtZHmYqQGcfTF3iAY8OIYr6wTh3XGh/3zpR2hRRQ+7ddMq4Rr9AkiXiV6CUMZ9qX0LS2wCwT9LvYsj+wfkOKhc8ZAiiu05EAw8VAjlA6lafBVwi1XSYmanKKVkmqpp4JUIFOfhrdsVe0C6jo+S1rbc6927sOGdz3whEZoQfMhMJOThHP5/GOuhEtkmFDJUwbD5suRqZ2DpTQMNbIeHDUwDld95xE17TJtQv48C7mWQz7m138ljjcIrRu1FT7ZTX29n+mJPBAEvoQLDJYtA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(396003)(366004)(346002)(39860400002)(376002)(136003)(33656002)(966005)(71200400001)(8676002)(786003)(5660300002)(26005)(4326008)(478600001)(316002)(86362001)(91956017)(76116006)(2906002)(54906003)(8936002)(9686003)(66946007)(52536014)(7696005)(55016002)(64756008)(6506007)(66556008)(66476007)(66446008)(186003)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: /TrAi6t0s4aQBNJzBnAUopWeiFnrRosZXxaSn9BoTN/eNHoXJj9kWB1AQHuEnVXCdStCB7eWps76JVXFH1+QZaiRoqPvRtfKi/X1isW4qzEpAeIyno+Bn3HLpHQAQaCx33ITu0/C5W9j7tHnG8Lr/QtWmGEHMZwJU29qF87T70aKrSPlDCA2SSrOjXX2hlE/cTALTm42KxqU2b2rSlr5L9kgo/uRuLOA69O17EzUq4fADbcVIcfmaNn8gda9TXnxuQOcnKpK/IbglPTvUmts0AYGjycy+QNvxu7VtW2Sxz9E6gVjVXlEtCnAhzZOpqNxz4NdT8598wFfDfew0F7oqsC1OOqjGW9nRZ7mbXVB3TLhSeHEMypXgrBShmF5Klut7AcuzQc+9MpO5zIaTd/rrG8pEuIKszsXwqELs3hAmyf95mfI0ltS4SxozR+x46oWTIi5V+bfSU1xSWpKqFhmhNaZuCr4xUFMJqaAZ+H62ZzCCAtZCYI0U2xW83B7VF4Ccmt+TtxYqXjVg3/mSVkeI29qoAXYGW2x3QLeSsuTd2KIJejcOnVz9UfSiqtMe5hajx5XfRVlau7O2BgOU8Wp7gR9UHOJvD6CNGKkZYtImU/o8abRPGbxyniR7dddt+Q43LOv3E8WtDLAUlc+fvgssg== x-ms-exchange-transport-forked: True 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: YTBPR01MB3966.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: bbe03bed-dd42-41b3-66b8-08d8569cf3e9 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Sep 2020 21:52:17.9581 (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: TiM/kzd/b9hErm1qw9/n8tUXlQhK/KlsOl7Qyo5fW84Jf0x8Zu1bErXqpDinADXkCPB0NmwJ3JsUbAcOc9F1iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTBPR01MB3165 X-Rspamd-Queue-Id: 4Bp8cM6m9Jz3fcV X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=uoguelph.ca header.s=selector1 header.b=eYUXJ2rd; dmarc=pass (policy=none) header.from=uoguelph.ca; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.75 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-6.25 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.926]; R_DKIM_ALLOW(-0.20)[uoguelph.ca:s=selector1]; FREEFALL_USER(0.00)[rmacklem]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[5]; DWL_DNSWL_LOW(-1.00)[uoguelph.ca:dkim]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[uoguelph.ca:+]; DMARC_POLICY_ALLOW(-0.50)[uoguelph.ca,none]; RCVD_IN_DNSWL_NONE(0.00)[40.107.66.75:from]; NEURAL_HAM_SHORT(-1.32)[-1.321]; FREEMAIL_TO(0.00)[gmail.com,FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.107.66.75:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 21:52:21 -0000 Konstantin Belousov wrote:=0A= >On Fri, Sep 11, 2020 at 08:49:36PM +0000, Alan Somers wrote:=0A= >> Author: asomers=0A= >> Date: Fri Sep 11 20:49:36 2020=0A= >> New Revision: 365643=0A= >> URL: https://svnweb.freebsd.org/changeset/base/365643=0A= >>=0A= >> Log:=0A= >> cp: fall back to read/write if copy_file_range fails=0A= >>=0A= >> Even though copy_file_range has a file-system agnostic version, it sti= ll=0A= >> fails on devfs (perhaps because the file descriptor is non-seekable?) = In=0A= >> that case, fallback to old-fashioned read/write. Fixes=0A= >> "cp /dev/null /tmp/null"=0A= >=0A= >Devices are seekable.=0A= >=0A= >The reason for EINVAL is that vn_copy_file_range() checks that both in and= out=0A= >vnodes are VREG. For devfs, they are VCHR.=0A= =0A= I coded the syscall to the Linux man page, which states that EINVAL is retu= rned=0A= if either fd does not refer to a regular file.=0A= Having said that, I do not recall testing the VCHR case under Linux. (ie. I= t might=0A= actually work and the man page turns out to be incorrect?)=0A= =0A= I will test this case under Linux when I get home next week, rick=0A= =0A=