fast_io.rs: use splice if copy_file_range is not supported - #459
Open
Franklin-Qi wants to merge 2 commits into
Open
Franklin-Qi wants to merge 2 commits into
Franklin-Qi wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #459 +/- ##
==========================================
+ Coverage 83.86% 83.93% +0.06%
==========================================
Files 14 14
Lines 7203 7444 +241
Branches 424 438 +14
==========================================
+ Hits 6041 6248 +207
- Misses 1157 1191 +34
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Franklin-Qi
force-pushed
the
fix-#443-use-sendfile-or-splice-if-copy-file-range-is-not-supported
branch
from
June 5, 2026 07:57
cee18ce to
581e725
Compare
Contributor
|
sendfile is internally splice. So no worth to try it. splice with middler pipe is faster. |
Contributor
|
Please use rustix instead of unsafe libc. |
oech3
reviewed
Aug 5, 2026
Contributor
|
@Franklin-Qi sorry, it needs to be rebased |
Franklin-Qi
force-pushed
the
fix-#443-use-sendfile-or-splice-if-copy-file-range-is-not-supported
branch
from
August 12, 2026 00:35
581e725 to
bd5b0e2
Compare
Franklin-Qi
force-pushed
the
fix-#443-use-sendfile-or-splice-if-copy-file-range-is-not-supported
branch
5 times, most recently
from
August 12, 2026 01:34
7551756 to
1889db5
Compare
oech3
reviewed
Aug 12, 2026
oech3
reviewed
Aug 12, 2026
oech3
reviewed
Aug 12, 2026
oech3
reviewed
Aug 12, 2026
oech3
reviewed
Aug 12, 2026
oech3
reviewed
Aug 12, 2026
Contributor
|
remove sendfile from PR's title and the commit message. |
Contributor
|
@Franklin-Qi ping? |
Contributor
Author
Yeah, I will deal with this issue soon. @sylvestre |
sylvestre
reviewed
Sep 27, 2026
sylvestre
reviewed
Sep 27, 2026
sylvestre
reviewed
Sep 27, 2026
sylvestre
reviewed
Sep 27, 2026
sylvestre
reviewed
Sep 27, 2026
sylvestre
reviewed
Sep 27, 2026
sylvestre
reviewed
Sep 27, 2026
- Prefer splice (via rustix) for file→pipe output, and enlarge the pipe buffer when possible. - Fall back in reliable_copy_file_range with copy_file_range → splice (middle pipe) → write, advancing in_ptr correctly after a partial copy. - Cover the paths with Linux unit tests and an end-to-end large-file pipe-through-sed test. Closes: uutils#443
Franklin-Qi
force-pushed
the
fix-#443-use-sendfile-or-splice-if-copy-file-range-is-not-supported
branch
from
September 30, 2026 11:03
1889db5 to
9628ac1
Compare
If splice becomes unsupported after some bytes were already sent, return Some(copied) so the write fallback only emits the remainder.
Franklin-Qi
force-pushed
the
fix-#443-use-sendfile-or-splice-if-copy-file-range-is-not-supported
branch
from
September 30, 2026 11:22
9628ac1 to
49fe557
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fast_io.rs: use splice if copy_file_range is not supported
Closes: #443