-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-linuxOperating system: LinuxOperating system: LinuxS-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
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
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-linuxOperating system: LinuxOperating system: LinuxS-blockedStatus: Blocked on something else such as an RFC or other implementation work.Status: Blocked on something else such as an RFC or other implementation work.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.