Re: PROBLEM: KB->KiB, MB -> MiB, ... (IEC 60027-2)

From: Andries Brouwer
Date: Sat Jan 27 2007 - 10:30:42 EST


On Sat, Jan 20, 2007 at 09:08:47AM +0100, MichaÅ KudÅa wrote:
> Hello,

> after
> ...
> hdb: max request size: 512KiB
> hdb: 488397168 sectors (250059 MB) w/8192KiB Cache, CHS=30401/255/63,
>
> Should be everywere KiB, MiB, GiB, ... according to IEC 60027-2

You are mistaken. The MB here are actual megabytes (million bytes), not MiB.
Read the code, or do the computation: 488397168*512 = 250059350016.

(Precisely what one wants - the kernel gives the correct size,
just like the disk manufacturers, and there is no discrepancy.
Binary abuse for decimal prefixes is a sloppiness that might be
acceptable for stuff that naturally comes in powers of two.
It is long ago that that was true for disks.)

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/