4 ms·
Well, Rust's `copy_regular_files` uses the (Linux) syscall `copy_file_range` https://man7.org/linux/man-pages/man2/copy_file_range.2.html Go has had some
by ReleaseCandidat 5y ago
Well, Rust's `copy_regular_files` uses the (Linux) syscall `copy_file_range`
https://man7.org/linux/man-pages/man2/copy_file_range.2.html
Go has had some troubles because they used that with their `io.Copy()`:
https://lwn.net/ml/linux-kernel/20210212044405.4120619-1-drinkcat@chromium.org/
Article about `copy_file_range`
https://lwn.net/Articles/846403/ https://lwn.net/Articles/846403/
Btw. https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/std/sys/unix/kernel_copy/fn.copy_regular_files.html https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/std/sys/u...
As the name says, it only works on regular files.
is a bit misleading, it does only work on regular files in the same filesystem when using a kernel older than 5.3.
EXDEV The files referred to by fd_in and fd_out are not on the same mounted filesystem (pre Linux 5.3).