Re: HDIO_GETGEO vs. BLKGETSIZE

From: Andries Brouwer (aeb@veritas.com)
Date: Mon May 22 2000 - 11:05:36 EST


On Mon, May 22, 2000 at 04:47:16PM +0100, David Woodhouse wrote:

> aeb@veritas.com said:
> > > What if BLKGETSIZE/(H*S) isn't an integer?
> > / is the C operator. It rounds down.
>
> Sorry, what I meant to say was:
>
> What if (BLKGETSIZE / (H*S)) * (H*S) != BLKGETSIZE?
>
> Is there anything that's likely to get confused by that?

No. It happens all the time:

# hdparm -g /dev/hda
 geometry = 2100/255/63, sectors = 33750864, start = 0

and 2100*255*63 = 33736500 < 33750864.
It just means that if you use an fdisk that likes partitions
to start and end on cylinder boundaries, the last partial
cylinder is wasted. In this case that would be 7 MB.

Andries

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:22 EST