Comment 107 for bug 438136

Revision history for this message
In , Jelot-freedesktop (jelot-freedesktop) wrote :

(In reply to comment #1)
> The reason I picked log2() here is simply that we do want to allow more bad
> sectors on bigger drives than on small ones. But a linearly related threshold
> seemed to increase too quickly, so the next choice was logarithmic.
>
> Do you have any empiric example where the current thresholds do not work as
> they should?
>

For convenience I use kibibyte, mebibyte, gibibyte ...

128 GiB = 2^37 -> log2(2^37/512) = log2(2^37/2^9) = 28 sectors

For an HDD of 128 GiB (2^37 Bytes) the calculated threshold value is 28 sectors (14336 Bytes = 14 KiB), isn't it too low?

For an HDD of 1 TiB (2^40 Bytes) the calculated threshold value is 31 sectors (15872 Bytes = 15.5 KiB) ...

For an hypothetical HDD of 1 PiB (2^50 Bytes, 1024 tebibyte) the calculated threshold is only 41 sectors (20992 Bytes = 20.5 KiB) ...

If we do want to allow more bad sectors on bigger drives than on small ones, IMHO this isn't a good heuristic.

Difference between HDD of 128 GiB and HDD of 8 TiB is only 6 sectors (3 KiB)