From nobody Tue Apr 04 10:15:07 2023 X-Original-To: dev-commits-src-all@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 4PrNtR1Sdvz43L0B; Tue, 4 Apr 2023 10:15:11 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PrNtR0FRXz439j; Tue, 4 Apr 2023 10:15:10 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Authentication-Results: mx1.freebsd.org; none Received: from critter.freebsd.dk (unknown [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 4066C8929A; Tue, 4 Apr 2023 10:15:08 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.17.1/8.16.1) with ESMTPS id 334AF7d4006043 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 4 Apr 2023 10:15:07 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.17.1/8.16.1/Submit) id 334AF7oF006042; Tue, 4 Apr 2023 10:15:07 GMT (envelope-from phk) Message-Id: <202304041015.334AF7oF006042@critter.freebsd.dk> To: Alexey Dokuchaev cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 643336549081 - main - If copy_file_range(2) fails with EXDEV, use fall-back. In-reply-to: From: "Poul-Henning Kamp" References: <202304040740.3347eiU8033699@gitrepo.freebsd.org> <202304040959.3349xqqB005509@critter.freebsd.dk> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6040.1680603307.1@critter.freebsd.dk> Date: Tue, 04 Apr 2023 10:15:07 +0000 X-Rspamd-Queue-Id: 4PrNtR0FRXz439j X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N -------- Alexey Dokuchaev writes: > Okay, but did it leave an empty file, I wonder? I didn't check, but it probably would, because cp(1) must have opened and created the destination in order to call copy_file_range(2). PS: I'll note that EXDEV is not a documented return value from copy_file_range(2), and my surprise that cp(1) did not revert to the fall-back, no matter why copy_file_range(2) failed. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.