Antonio Diaz Diaz wrote:
and interestingly also not for "media changed".
Maybe ESTALE could be used for "media changed".
Sounds reasonable.
Any suggestion for a better fallback errno?
Once the system mixes fatal and non-fatal errors (for example by
returning ERROR_MEDIA_CHANGED instead of EIO) any mapping will make
ddrescue behave incorrectly one way or the other.
In addition to all this, option '-O, --reopen-on-error' only has
effect during the copying phase, when data are copied in large blocks.
Therefore the proposed '--continue-on-errno' would make ddrescue
behave incorrectly during trimming, scraping, and retrying.
Add --reopen-on-error[=copying|always] ?
Therefore I propose the following simpler change:
[...]
Great, this would help.
OK. I'll release a test version as soon as I have it implemented.
For diagnostics of possible other "interesting" behavior, it would also
be helpful to see an errno if interpreted as non-fatal but with
unexpected value, e.g. different from EIO.
The problem is to find a way for ddrescue to show such errno values,
as there may be thousands of failed reads per second.
But there are not thousands of different errno values :-)
Which errno != EIO do typically occur on Linux, FreeBSD etc after read
errors ?
(Maybe adding an errno field to the output of '--log-reads').
This is IMO an obvious place.
Thanks,
Christian