mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-19 18:26:32 +02:00
copy: copy_file_range: handle ENOENT for CIFS
* src/copy.c (sparse_copy): Fallback to standard copy upon ENOENT, which was seen intermittently across CIFS file systems. * NEWS: Mention the bug fix, though qualify it as an "issue" rather than a bug, as coreutils is likely only highlighting a CIFS bug in this case. Fixes https://bugs.gnu.org/60455
This commit is contained in:
4
NEWS
4
NEWS
@@ -25,6 +25,10 @@ GNU coreutils NEWS -*- outline -*-
|
||||
which may have resulted in data corruption.
|
||||
[bug introduced in coreutils-7.5 and enabled by default in coreutils-9.0]
|
||||
|
||||
cp, mv, and install now handle ENOENT failures across CIFS file systems,
|
||||
falling back from copy_file_range to a better supported standard copy.
|
||||
[issue introduced in coreutils-9.0]
|
||||
|
||||
'mv --backup=simple f d/' no longer mistakenly backs up d/f to f~.
|
||||
[bug introduced in coreutils-9.1]
|
||||
|
||||
|
||||
@@ -290,6 +290,11 @@ sparse_copy (int src_fd, int dest_fd, char **abuf, size_t buf_size,
|
||||
if (errno == EPERM && *total_n_read == 0)
|
||||
break;
|
||||
|
||||
/* ENOENT was seen sometimes across CIFS shares, resulting in
|
||||
no data being copied, but subsequent standard copies succeed. */
|
||||
if (errno == ENOENT && *total_n_read == 0)
|
||||
break;
|
||||
|
||||
if (errno == EINTR)
|
||||
n_copied = 0;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user