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

Richard B. Johnson (root@chaos.analogic.com)
Mon, 28 Dec 1998 18:17:18 -0500 (EST)


On 28 Dec 1998, H. Peter Anvin wrote:

> Followup to: <m0zuixK-000vJZC@zamenhof.demon.co.uk>
> By author: martin@zamenhof.demon.co.uk (Martin Radford)
> In newsgroup: linux.dev.kernel
> >
> > The problem is that the reporting is confused -- the MB number is
> > bytes / 2^20, but the GB number is MB / 10. Either the MB number
> > should be changed to bytes / 10^6, or the GB number should be
> > changed to MB / 2^10.
> >
> > I'd be tempted to keep the GB entry as refering to 2^30 bytes, and
> > replace the MB entry with Mi.B. (i.e. millions of bytes, which seems
> > to be what manufacturers use). That way, we can keep both camps
> > happy, and (more important) stop future users from asking why Linux
> > doesn't recognise the full capacity of their drives.
> >
> > So, we'd get
> >
> > SCSI device sdb: hdwr sector= 512 bytes. Sectors= 17916240 [9173 Mi.B] [8.5 GB]
> >
> > (And if people ask why the difference, then the 9173 is "marketing
> > megabytes", and the 8.5Gb is the "real figure".)
> >
>
> No! Let's not add more marketing crap here. Keep MB as real
> megabytes!
>
> -hpa

Trick question; "Is this correct?"

N / 1024 = kilobytes
N / (1024 * 1024) = megabytes
N / (1024 * 1024 * 1024) = gigabytes

No dictionary I have available defines any of these. Even IEEE Software
Engineering Standards (3rd Addition) doesn't define. The closest I
found was kilobit (1000 bits). This is in Webster's New Collegiate
Dictionary, 1996.

So, what is the definitive reference that is irrefutable and defines these
terms? This should be answered before we change anything. It just might
be that a kilobyte, megabyte, and gigabyte should be in decimal terms like
kilohertz, megahertz, and gigahertz -- and we've been wrong all along.

Note that the usual "1.44MB" floppy is 1.40625 MB.

18 * 160 * 512 = 1,474,560
/ 1024 = 1,440
/ 1024 - 1.40625

It looks to me as though the world has been dividing megabytes by 1,000
to get gigabytes all along.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.131 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
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/