Skip to content

split: preliminary for distinguishing read/write errors (& reflink)#13105

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:split-unbuf
Open

split: preliminary for distinguishing read/write errors (& reflink)#13105
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:split-unbuf

Conversation

@oech3

@oech3 oech3 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

GNU shows file path which caused I/O error. We need to separate out read/write instead of using std::io::copy to do same thing. Add copy method.
(This refactoring is useful for adding reflink support in the future BTW...)

@codspeed-hq

codspeed-hq Bot commented Jun 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 323 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing oech3:split-unbuf (263b158) with main (43ef8d0)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@oech3 oech3 marked this pull request as ready for review June 26, 2026 18:59
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.
Note: The gnu test tests/misc/write-errors was skipped on 'main' but is now failing.

Comment thread src/uu/split/src/split.rs
Strategy::Bytes(chunk_size) => {
let mut writer = ByteChunkWriter::new(chunk_size, settings)?;
copy(&mut reader, &mut writer)
Ok(writer.copy(&mut reader, io_blksize)?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While CodSpeed reported performance gain, this is double buffered by BufReader. I'll fix it at different PR.

@oech3 oech3 marked this pull request as draft June 27, 2026 05:44
@oech3 oech3 marked this pull request as ready for review June 27, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant