]> git.ipfire.org Git - thirdparty/coreutils.git/commit
copy: immediately fail with transient reflink errors
authorPádraig Brady <P@draigBrady.com>
Mon, 2 Jan 2023 13:07:41 +0000 (13:07 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 6 Jan 2023 14:32:44 +0000 (14:32 +0000)
commitf6c93f334ef5dbc5c68c299785565ec7b9ba5180
treea8e1c2b3416bb3a0122751bc4d9a68abdb8e2f40
parentf4567ed953d3eb14b8eefc4744603c2594bb73f3
copy: immediately fail with transient reflink errors

* src/copy.c (handle_clone_fail): A new function refactored
from copy_reg() to handle failures from FICLONE or fclonefileat().
Fail with all errors from FICLONE, unless they're from the set
indicating the file system or file do not support the clone operation.
Also fail with errors from fclonefileat() (dest_dest < 0)
if they're from the set indicating a transient failure for the file.
(copy_ref): Call handle_clone_fail() after fclonefileat() and FICLONE.
(sparse_copy): Call the refactored is_CLONENOTSUP()
which is now also used by the new handle_clone_fail() function.
* NEWS: Mention the bug fix.  Also mention explicitly
the older --reflink=auto default change to aid searching.
* cfg.mk: Adjust old_NEWS_hash with `make update-NEWS-hash`.
Fixes https://bugs.gnu.org/60489
NEWS
cfg.mk
src/copy.c