From owner-freebsd-fs@freebsd.org Wed Jun 19 23:56:06 2019 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B1FA15CE132 for ; Wed, 19 Jun 2019 23:56:06 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660064.outbound.protection.outlook.com [40.107.66.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-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 5C3268930E for ; Wed, 19 Jun 2019 23:56:03 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM (10.165.219.7) by YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM (10.165.219.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.13; Wed, 19 Jun 2019 23:56:02 +0000 Received: from YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM ([fe80::fdaa:6868:bd31:8b7d]) by YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM ([fe80::fdaa:6868:bd31:8b7d%5]) with mapi id 15.20.1987.014; Wed, 19 Jun 2019 23:56:02 +0000 From: Rick Macklem To: "freebsd-fs@freebsd.org" Subject: RFC: should a copy_file_range(2) syscall work across multiple file systems? Thread-Topic: RFC: should a copy_file_range(2) syscall work across multiple file systems? Thread-Index: AQHVJvnAX1ESpadgmUO7NE9/ivxBhQ== Date: Wed, 19 Jun 2019 23:56:02 +0000 Message-ID: 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: 4826aeed-0915-4ac7-778a-08d6f511af31 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:YTXPR01MB0285; x-ms-traffictypediagnostic: YTXPR01MB0285: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0073BFEF03 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(366004)(376002)(346002)(199004)(189003)(81166006)(478600001)(86362001)(99286004)(8936002)(53936002)(2906002)(71190400001)(476003)(33656002)(52536014)(6436002)(316002)(786003)(6506007)(8676002)(81156014)(5660300002)(6306002)(186003)(66946007)(46003)(66476007)(64756008)(6916009)(9686003)(486006)(14454004)(76116006)(66446008)(7696005)(2351001)(305945005)(71200400001)(966005)(74316002)(4744005)(73956011)(74482002)(25786009)(55016002)(68736007)(66556008)(102836004)(2501003)(256004)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0285; H:YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: dAKvJsDrx0NRNZdyoeWf1H93MEOuGL7C1H1Zza9om7ubadvdh2x31xjeDHyTLNLn6hqm0bX+W/FTVlfP3zBzNmMp7ItM7s1fjTWrFzJ4zQPuFS6ijiV2xqxV9rlh2OaHDAN4jqZDGfCdp4OQNNKy+LwB2wY2FadDvslakyk2jej311BqzyK4w0AyC6hmuVOKzyCjfXUbwbUDsSd20jx5jyhAIma5SKWMs+YgcRWjvkiffzE69YqV40WmzP3CSciVpDWIYn4APh4brcB5V43u9JTwcFXSAvdA7gaIVfISM8HAIGWWb2djXRZuKTtxK/2kMFQgyubKQkvw77bP5puMiL15m8olDqe3BhrRxyaN3LEZjYtZPr2Va7brVKsD73VQkI85eDFYQE7uuC02B2cpwzdREg3+0xDzPIiFt3ReGWA= 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-Network-Message-Id: 4826aeed-0915-4ac7-778a-08d6f511af31 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2019 23:56:02.0956 (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: rmacklem@uoguelph.ca X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0285 X-Rspamd-Queue-Id: 5C3268930E X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.64 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-1.04 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.931,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[uoguelph.ca]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.82)[-0.816,0]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.02)[0.018,0]; MX_GOOD(-0.01)[mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com]; RCVD_IN_DNSWL_NONE(0.00)[64.66.107.40.list.dnswl.org : 127.0.3.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jun 2019 23:56:06 -0000 I have been working on a copy_file_range(2) syscall for FreeBSD, which is m= eant to be compatible with the Linux one. (Current patch is at https://reviews.freebsd.org/D20584) One thing the current patch does do is allow the kernel copy to be done acr= oss multiple file systems (ie. source and destination files on different file s= ystems). The Linux syscall *may* not allow this. The man page specifies EXDEV as an error return, but discussion of the Linux syscall suggests that it may be (= or has already been) modified to work across multiple file systems. I thought that this would be a useful feature, but does require the default code to be above the VOP_xxx() layer and *might* not be Linux compatible. (The incompatibility would be working for cases where the Linux syscall mig= ht not.) So, should it work across multiple file systems? rick