cli/dd: Keep in-order output going after ignored errors #133
Reference in New Issue
Block a user
No description provided.
Delete Branch "koolkhel/vitastor:dd-noerror-in-order"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
With
conv=noerror, a failed read dropped its block and a failed write dropped its buffer. Output written in order (a pipe,oflag=append) then waited for that block forever, spinning the copy loop. The hang dates from986cd117(pipe output). It became reachable withoflag=appendafter9684e1af.conv=noerror.Split out of #130 as asked; the two PRs don't depend on each other. They conflict only on one member declaration and on neighbouring test lines, so I'll rebase whichever goes second.
Tested: two new cases in
tests/test_dd.sh:conv=noerror oflag=appendfrom/sys/class/net/lo/speed, whose read fails with EINVAL, gives a block of zeros. Without the fix, dd hangs.conv=noerrorfrom an unattached/dev/net/tun, whose read fails with EBADFD, ends the copy with an error and writes nothing. Without the fix, dd exits with 0.Each case is skipped where its device is missing, or where it can be read. The whole test passes with the fix.
Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA