-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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/kernel_copy.rs: copy_file_range_candidate allows empty output files #114373
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joshtriplett (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
Sanity checking myself here (see
|
This is for rust-lang#114341 The `meta.len() > 0` condition here is intended for inputs only, ie. when input is in the `/proc` filesystem as documented. That inaccurately included empty output files which are then shunted to the sendfile() routine leading to higher than nescessary IO util in some cases, specifically with CoW filesystems like btrfs. Further, `NoneObtained` is not relevant in this context, so remove it. Simply, determine what is input or output given the passed enum Unit.
@bors r+ rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#113534 (Forbid old-style `simd_shuffleN` intrinsics) - rust-lang#113999 (Specify macro is invalid in certain contexts) - rust-lang#114348 (Migrate GUI colors test to original CSS color format) - rust-lang#114373 (unix/kernel_copy.rs: copy_file_range_candidate allows empty output files) - rust-lang#114404 (Migrate GUI colors test to original CSS color format) - rust-lang#114409 (builtin impl confirmation wuhu) - rust-lang#114429 (compiletest: Handle non-utf8 paths (fix FIXME)) - rust-lang#114431 (Enable tests on rustc_codegen_ssa) r? `@ghost` `@rustbot` modify labels: rollup
This is for #114341
The
meta.len() > 0
condition here is intended for inputs only, ie. when input is in the/proc
filesystem as documented.That inaccurately included empty output files which are then shunted to the sendfile() routine leading to higher than nescessary IO util in some cases, specifically with CoW filesystems like btrfs.
Simply, determine what is input or output given the passed boolean.