Comment 98 for bug 438136

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

A comment in the code say:

/* We use log2(n_sectors) as a threshold here. We had to pick
 * something, and this makes a bit of sense, or doesn't it? */

this means:

128GB = 2^37 Bytes -> log2(2^28) = 28 sectors
1TB = 2^40 Bytes -> log2(2^31) = 31 sectors
8TB = 2^43 Bytes -> log2(2^34) = 34 sectors

I think that this is a unlucky heuristic.

The meaning of raw value is vendor specific.
Could have sense if BAD_SECTOR_MANY is calculated like:

(worst value - threshold value) <= 5 ?

obviously this is only an example