about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorxstaticxgpx <gabe@gabe.tech>2023-08-02 09:58:30 -0400
committerxstaticxgpx <gabe@gabe.tech>2023-08-03 19:27:45 -0400
commit2232fe8da3dcd4796e6db060ba61ba9c70a2a3f5 (patch)
treef7331700d2cae885de07f37bcb932f3b5189f125 /compiler/rustc_llvm/llvm-wrapper
parentd1708334312f654204edd21b3e93cf29da847187 (diff)
downloadrust-2232fe8da3dcd4796e6db060ba61ba9c70a2a3f5.tar.gz
rust-2232fe8da3dcd4796e6db060ba61ba9c70a2a3f5.zip
unix/kernel_copy.rs: copy_file_range_candidate allows empty output files
This is for https://github.com/rust-lang/rust/issues/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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions