[cygwin] Re: DD bug fails to wipe last 48 sectors of a disk

Jason Pyeron jpyeron@pdinc.us
Mon Sep 14 17:09:29 GMT 2020


> From: Hamish McIntyre-Bhatty
> Sent: Monday, September 14, 2020 12:34 PM
> 
> On 14/09/2020 17:32, Jason Pyeron wrote:
> >> -----Original Message-----
> >> From: Erik Soderquist
> >> Sent: Monday, September 14, 2020 11:55 AM
> >>
> >> On Mon, Sep 14, 2020 at 11:45 AM Hamish McIntyre-Bhatty via Cygwin wrote:
> >>> Was this ever resolved? I could have sworn I saw some discussion about
> >>> this but I can't find it in the archives.
> >> I still have the thread in my local email; a couple viable work
> >> arounds were provided, but the issue's root cause is on the Windows
> >> side, so I believe the only real route to a true fix would be via
> >> Microsoft altering their code.
> > When accessing with proper (aligned) block size and count I do not encounter the problem - happy to
> test again.
> >
> >>> It might also affect ddrescue, I feel.
> >> I believe you are accurate in this feeling.

(next time, please attempt to bottom post on this mailing list, moved it where it belongs)

> Could you perhaps try with ddrescue for me please (also has a block size
> option)? I could try and reproduce myself but without the email thread
> that will be a challenge.

Yes, I observed the same result with ddrescue before (bad input = bad behavior, good input = good behavior). The issue, as I have observed it, is if Windows is asked to write a string of blocks, past the end of the drive it will silently fail and not write some of those block BEFORE the end of the drive.

If block size (bs) is a multiple of 4096 (or 512 for most drives) and the count * bs = drive size exactly (as reported by windows) no error.




More information about the Cygwin mailing list