It seems std::io::copy sometimes invokes splice on Linux. Don't do this! Using splice can lead to data corruption (one user reported that his backups was damaged). Also, Linus Torvalds said that splice should not be used as general-purpose copy tool. See details here: systemd/systemd#29044 . There are situations where splice is okay, but it is not good as general-purpose copy mechanism. Use of sendfile and copy_file_range should be questioned, too. Any other use of splice in std should be audited, too
Rust version: 90f3a6f
It seems
std::io::copysometimes invokesspliceon Linux. Don't do this! Usingsplicecan lead to data corruption (one user reported that his backups was damaged). Also, Linus Torvalds said thatspliceshould not be used as general-purpose copy tool. See details here: systemd/systemd#29044 . There are situations wherespliceis okay, but it is not good as general-purpose copy mechanism. Use ofsendfileandcopy_file_rangeshould be questioned, too. Any other use ofspliceinstdshould be audited, tooRust version: 90f3a6f