Re: [PATCH] pdcraid and weird IDE geometry

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Thu Jul 17 2003 - 09:58:38 EST


On Iau, 2003-07-17 at 15:37, Walt H wrote:

> On the second drive, it's like this:
> capacity = 80418240, head=255, sect = 63
> lba = capacity / (head * sect) = 5005 int or 5005.80 float
> lba = lba * (head * sect) = 80405325 int or 80418240.01 float
> lba = lba - sect = 80405262 int or 80418177 float

Would fixed point solve this. Start from capacity <<= 16 and then
do the maths. That would put lba in 65536ths of a sector which
should have the same result as your float maths

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



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:29 EST