The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c5b5f2d8086f540fefe4826da013dd31d4e45fe8

commit c5b5f2d8086f540fefe4826da013dd31d4e45fe8
Author:     Mateusz Guzik <m...@freebsd.org>
AuthorDate: 2023-04-24 16:04:53 +0000
Commit:     Mateusz Guzik <m...@freebsd.org>
CommitDate: 2023-04-24 16:04:53 +0000

    cp: Revert "If copy_file_range(2) fails with EXDEV, use fall-back."
    
    This reverts commit 64333654908153cd8e2dcb408c57cc3e3c4f29af.
    
    The error is not valid per api contract, it showed up as a regression
    after 15f0b8c309dea1dcb14d3e374686576ff68ac43f
    
    15f0b8c309dea1dc ("zfs: merge openzfs/zfs@9cd71c860 (master)") and was
    subsequently in d012836fb6165494 ("zfs: fix up EXDEV handling for
    clone_range").
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 bin/cp/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 9794152ac724..8c1c350ff6f1 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -180,7 +180,7 @@ copy_file(const FTSENT *entp, int dne)
                        if (use_copy_file_range) {
                                wcount = copy_file_range(from_fd, NULL,
                                    to_fd, NULL, SSIZE_MAX, 0);
-                               if (wcount < 0 && (errno == EINVAL || errno == 
EXDEV)) {
+                               if (wcount < 0 && errno == EINVAL) {
                                        /* Prob a non-seekable FD */
                                        use_copy_file_range = 0;
                                }

Reply via email to