From owner-freebsd-current@freebsd.org Fri Jul 5 00:28:55 2019 Return-Path: Delivered-To: freebsd-current@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 104E115E11C5 for ; Fri, 5 Jul 2019 00:28:55 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670089.outbound.protection.outlook.com [40.107.67.89]) (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 3B59176F34; Fri, 5 Jul 2019 00:28:52 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM (10.165.219.7) by YTXPR01MB0287.CANPRD01.PROD.OUTLOOK.COM (10.165.219.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.16; Fri, 5 Jul 2019 00:28:51 +0000 Received: from YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM ([fe80::9cc8:c3b7:19c2:7baf]) by YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM ([fe80::9cc8:c3b7:19c2:7baf%4]) with mapi id 15.20.2032.019; Fri, 5 Jul 2019 00:28:51 +0000 From: Rick Macklem To: "freebsd-current@FreeBSD.org" CC: "kib@freebsd.org" , Alan Somers Subject: should a copy_file_range(2) syscall be interrupted via a signal Thread-Topic: should a copy_file_range(2) syscall be interrupted via a signal Thread-Index: AQHVMsfe501Pgm1HEESW4i3o9xExQA== Date: Fri, 5 Jul 2019 00:28:51 +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: 4b21f22d-0a02-4e70-1877-08d700dfc125 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:YTXPR01MB0287; x-ms-traffictypediagnostic: YTXPR01MB0287: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 008960E8EC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(136003)(376002)(39850400004)(396003)(189003)(199004)(486006)(81166006)(6506007)(81156014)(256004)(54906003)(46003)(14444005)(33656002)(5640700003)(14454004)(478600001)(6916009)(8936002)(476003)(99286004)(305945005)(53936002)(68736007)(4326008)(71200400001)(8676002)(786003)(86362001)(71190400001)(186003)(2501003)(64756008)(316002)(73956011)(66446008)(66946007)(76116006)(66476007)(66556008)(9686003)(102836004)(6306002)(450100002)(55016002)(52536014)(4744005)(6436002)(2351001)(7696005)(5660300002)(2906002)(74316002)(25786009)(966005)(74482002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0287; H:YTXPR01MB0285.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: 2azly+4NlI9ZJsYpkN+61Jw79sJy69oxL74UB0qQNVOrHQhJM3j9Hgy5fx1Hojtz5S8js9eR8ssMfcqPMnHuzyfH3AB1QzWJsbWN374FeY+bYCoBvyg7pzrTVas9tCTszfnS/v/qRXT20GJqIkAWb0TlQgZa7PNkkQSl7sgYVr6IO5EzCSBaE8+RDVaphfRZF2OgDKzcw1LDILA6DM7VsGFQCfWEGjRSwNVqWQ1DgsWO4wdBH1k8rl84F6lwd4UzqX62CxE6oTIjC5VU6GaSyhNtGJPVQrSlGMdEB8B2dV3aaTZjKdxJfwVKjLxneQ+ZyundWSQzylvG91Zz3aBWMH01u+IZC9BjqMu4LZmlSMwXS9UQCzVXBTvSw9o7lw5n6UpYrb3sp7apArvvzA0fO6ho5jcURH+O4X7jErz3Us8= 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: 4b21f22d-0a02-4e70-1877-08d700dfc125 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2019 00:28:51.3484 (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: YTXPR01MB0287 X-Rspamd-Queue-Id: 3B59176F34 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.67.89 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-4.10 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[uoguelph.ca]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.03)[ipnet: 40.64.0.0/10(-2.89), asn: 8075(-2.19), country: US(-0.06)]; 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]; NEURAL_HAM_SHORT(-0.76)[-0.763,0]; RCVD_IN_DNSWL_NONE(0.00)[89.67.107.40.list.dnswl.org : 127.0.3.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8075, ipnet:40.64.0.0/10, country:US]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jul 2019 00:28:55 -0000 Hi, I have been working on a Linux compatible copy_file_range(2) syscall (the current code can be found at https://reviews.freebsd.org/D20584). One outstanding issue is how it should deal with signals. Right now, I have vn_start_write() without PCATCH, so that it won't be interrupted by a signal, but I notice that vn_write() {ie. write syscall } = does have PCATCH on vn_start_write() and so does vn_rdwr() when it is called without IO_NODELOCKED. I am thinking that copy_file_range(2) should do this also. However, if it returns an error, it is impossible for the caller to know ho= w much of the data range got copied. What do you think the copy_file_range(2) code should do? Thanks, rick ps: I've used FreeBSD-current@ this time, to see if I get more replies than= I did using FreeBSD-fs@.