Skip to content

dd: name the failing operation and count the read that failed to write - #14071

Open
igorgbr wants to merge 1 commit into
uutils:mainfrom
igorgbr:dd/report-stats-on-io-error
Open

dd: name the failing operation and count the read that failed to write#14071
igorgbr wants to merge 1 commit into
uutils:mainfrom
igorgbr:dd/report-stats-on-io-error

Conversation

@igorgbr

@igorgbr igorgbr commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up to eb7f437, which made a failed copy report its statistics.

Two differences from GNU remained: when the write fails, the block that was
read is dropped instead of counted, so records in is one short; and the
message is IO error: <errno>, without the operation or the file.

$ dd if=/dev/zero of=/dev/full bs=1024 count=100
before: 0+0 records in / dd: IO error: No space left on device
after:  1+0 records in / dd: error writing '/dev/full': No space left on device
GNU:    1+0 records in / dd: error writing '/dev/full': No space left on device

dd_copy now returns UResult so the error carries the operation and the
file name; the existing ? paths keep the old generic context.

Refs #13092.

A failed copy reported `IO error: <errno>` without saying whether the read or the write failed, or on which file. It also dropped the record that had been read when the write failed, so `records in` was one short.
@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 4.99%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 356 untouched benchmarks
⏩ 50 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation numfmt_stream_to_si_precision 348.8 ms 332.2 ms +4.99%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing igorgbr:dd/report-stats-on-io-error (e92919e) with main (ec8adb5)

Open in CodSpeed

Footnotes

  1. 50 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.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Note: The gnu test tests/env/env-signal-handler was skipped on 'main' but is now failing.

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