cli/dd: Keep in-order output going after ignored errors #133

Merged
vitalif merged 1 commits from koolkhel/vitastor:dd-noerror-in-order into master 2026-11-20 19:33:14 +03:00

1 Commits

Author SHA1 Message Date
fa3821d737 cli/dd: Keep in-order output going after ignored errors
With conv=noerror a failed read dropped its block and a failed write
dropped its buffer. An output written in order (a pipe, oflag=append)
then waited for that block forever, spinning the copy loop.

A failed read from an image or a seekable input now gives a block of
zeros, which is what a seekable output already got as a hole. A stream
has no block to skip, so its read error ends the copy with an error,
also with conv=noerror. In-order writes advance by the blocks taken,
not by the bytes written, so an ignored write error does not stop them.
A write takes its block only once it has an io_uring sqe, so a full
ring no longer drops the block.
2026-11-19 19:04:07 +03:00