Re: patch for sd.c: fix MB vs. GB

Guest section DW (dwguest@win.tue.nl)
Thu, 24 Dec 1998 18:15:47 +0100 (MET)


From: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>

now that 2.2.0 is approaching I'd like to get this one really to be fixed
(I first tried it in April 1996 and the patch below is still applies correctly!).

the output for my disk

SCSI device sda: hdwr sector= 512 bytes. Sectors= 8399520 [4101 MB] [4.1 GB]
^^^^^^^ ^^^^^^
is just wrong, because

4101 MB / 1024 == 4.00488 GB

which is _not_ 4.1 GB !!!

I think the best point of view is to follow the SI standards.
k=1000, M=10^6, G=10^9.

Out of laziness people talked about 4k memory when they meant
4096 words, but there is nothing `right' about k=1024, it is
just a very common laziness.

Now memory modules come in power-of-two chunks, so this
laziness is defendible, it is easier to talk about 16 MB
than to say 16.8 MB, and everybody knows that really 2^24 B was meant.

With disks it is otherwise. So, I think the best patch would not
be to introduce more occurrences of 1024, but to replace the
remaining 1024's by 1000's and give real SI MB and GB figures.

(That should make people happier also, since their disks get larger :-).
It is also what manufacturers do. It is also what people mean when they
talk about the DOS/BIOS 8.4 GB limit.)

Andries

SCSI device sda: hdwr sector= 512 bytes. Sectors= 8399520 [4301 MB] [4.3 GB]

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