emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48036: closed ([PATCH] copy: do not refuse to copy a swap file)


From: GNU bug Tracking System
Subject: bug#48036: closed ([PATCH] copy: do not refuse to copy a swap file)
Date: Tue, 27 Apr 2021 01:04:01 +0000

Your message dated Mon, 26 Apr 2021 18:03:19 -0700
with message-id <043f0983-c92c-43b3-c9b6-50e86d1d9c32@cs.ucla.edu>
and subject line Re: bug#48036: [PATCH] copy: do not refuse to copy a swap file
has caused the debbugs.gnu.org bug report #48036,
regarding [PATCH] copy: do not refuse to copy a swap file
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48036: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48036
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] copy: do not refuse to copy a swap file Date: Mon, 26 Apr 2021 17:25:18 +0200
From: Zorro Lang <zlang@redhat.com>

* src/copy.c (sparse_copy): Fallback to read() if copy_file_range()
fails with ETXTBSY.  Otherwise it would be impossible to copy files
that are being used as swap.  This used to work before introducing
the support for copy_file_range() in coreutils.
---
 src/copy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/copy.c b/src/copy.c
index 9dbc694ebee..b7ec9747fa8 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -290,7 +290,7 @@ sparse_copy (int src_fd, int dest_fd, char *buf, size_t 
buf_size,
         if (n_copied < 0)
           {
             if (errno == ENOSYS || errno == EINVAL
-                || errno == EBADF || errno == EXDEV)
+                || errno == EBADF || errno == EXDEV || errno == ETXTBSY)
               break;
             if (errno == EINTR)
               n_copied = 0;
-- 
2.30.2




--- End Message ---
--- Begin Message --- Subject: Re: bug#48036: [PATCH] copy: do not refuse to copy a swap file Date: Mon, 26 Apr 2021 18:03:19 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
Thanks, I installed that into Savannah master coreutils.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]