Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix: check for EXDEV for uv__fs_copy_file_range #3108

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/unix/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,13 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) {
/* ENOSYS - it will never work */
errno = 0;
copy_file_range_support = 0;
} else if (r == -1 && errno == ENOTSUP) {
} else if (r == -1 && (errno == ENOTSUP || errno == EXDEV)) {
/* ENOTSUP - it could work on another file system type */

/* EXDEV - it will not work when in_fd and out_fd
* are not on the same mounted filesystem (pre Linux 5.3)
*/

errno = 0;
} else {
goto ok;
Expand Down