* src/cat.c (copy_cat):
* src/copy-file-data.c (sparse_copy):
Don’t treat EFBIG as a reportable error from copy_file_range.
If the input is at EOF and the output position is 2**63 - 1,
copy_file_range (ifd, NULL, ofd, NULL,
2146435072, 0)
incorrectly fails with EFBIG. Problem observed on Ubuntu 25.10
x86-64 with Linux kernel 6.17.0-8-generic #8-Ubuntu.
I am too lazy to report this kernel bug or add a coreutils test case.
case -1:
if (errno == ENOSYS || is_ENOTSUP (errno) || errno == EINVAL
|| errno == EBADF || errno == EXDEV || errno == ETXTBSY
- || errno == EPERM)
+ || errno == EPERM || errno == EFBIG)
return 0;
error (0, errno, "%s", quotef (infile));
return -1;
}
if (n_copied < 0)
{
+ /* Don’t treat EFBIG as a reportable error from copy_file_range.
+ If the input is at EOF and the output position is 2**63 - 1,
+ copy_file_range (ifd, NULL, ofd, NULL, 2146435072, 0)
+ incorrectly fails with EFBIG. Problem observed on Ubuntu 25.10
+ x86-64 with Linux kernel 6.17.0-8-generic #8-Ubuntu. */
+ if (errno == EFBIG)
+ break;
+
debug->offload = COPY_DEBUG_UNSUPPORTED;
/* Consider operation unsupported only if no data copied.