bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: permission denied in cygwin


From: Antonio Diaz Diaz
Subject: Re: permission denied in cygwin
Date: Thu, 22 Feb 2024 18:50:22 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Christian Franke wrote:
The problem is that no errno is offered for "unspecified" errors

IMHO the problem is the existence of "unspecified" errors. Ddrescue needs that the system returns 2 different kinds of errors: non-fatal (temporary or affecting just a sector, for example) and fatal (permanent, like EACCES "Permission denied").

If the system returns a fatal error code for a non-fatal error, ddrescue quits prematurely.

If the system returns a non-fatal error code for a fatal error, ddrescue marks the rest of the drive as "bad-sector" and rescues nothing.

and interestingly also not for "media changed".

Maybe ESTALE could be used for "media changed".

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.

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. (Maybe adding an errno field to the output of '--log-reads').

Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]