Messages in this thread | | | Subject | Re: [PATCH] pdcraid and weird IDE geometry | From | Alan Cox <> | Date | 17 Jul 2003 15:58:38 +0100 |
| |
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/
| |