Am 19. April 2011 17:34 schrieb Iustin Pop <[email protected]>: > The current wipe_chunk_size computation is doing min(int_value, > float_value). For small disks, the actual formula will result into the > float value being chosen. This results into very interesting > behaviour: > > Wiping disk 0, offset 102.4, chunk 102.4 > Wiping disk 0, offset 204.8, chunk 102.4 > … > Wiping disk 0, offset 921.6, chunk 102.4 > Wiping disk 0, offset 1024.0, chunk 1.13686837722e-13 > > Since these are passed to dd via %d, this will result into the call to > dd specifying offset 1024 and count 0, which will fail. > > We just need to enforce conversion to int, in order to not get bitten > by floating point rounding errors. > > The patch also reorders some logging messages in order to log the > chunk size.
LGTM (thanks for figuring this out!)
