HDIO_GETGEO vs. BLKGETSIZE
andre at linux-ide.org
Mon May 22 19:14:46 EDT 2000
If we have a superior answer over the "HDIO_GETBIGGEO" kludge, I am up for
change. I would ask it to stay until we verify that the newest changes
are what we desire........after that.....rip it......
On Mon, 22 May 2000, Andries Brouwer wrote:
> On Mon, May 22, 2000 at 01:06:17PM +0100, David Woodhouse wrote:
> > Is it permitted for a driver to returns CHS values for HDIO_GETGEO which,
> > when multiplied together, don't match the value returned by BLKGETSIZE?
> Yes - HDIO_GETGEO may contain whatever you want.
> A modern fdisk will use the values for heads and sectors/track
> given by HDIO_GETGEO, but ignore the value for cylinders.
> Indeed, since cylinders is a 16-bit field and the number of cylinders
> can be larger than 65535, the value may be truncated, and is to be
> considered worthless.
> Instead, the number of cylinders is computed as BLKGETSIZE/(H*S).
> (Thus, there is no need for a new ioctl HDIO_GETBIGGEO or so.
> I think the code for it should be deleted from the kernel.)
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
The Linux ATA/IDE guy
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd