Re: [PATCH] pdcraid and weird IDE geometry

From: David Zaffiro (
Date: Thu Jul 17 2003 - 07:19:03 EST

I don't think this has any to do with the calculation, you probably just have to use:


(well, combined with...


...and a lot of other options...)

With 2.4.20 the FORCE option had to be set at "n", now it should be set at "y".

> The calc_pdcblock_offset function calculates lba by taking the capacity
> of the drive and dividing it by (head * sector), multiplying the result
> times (head * sector) and subtracting the sector (SPT) count.
> Unfortunately, with the strange geometry reported by the new drive,
> using INTs to store these values will fail.

Avoiding floating-point precision, this would do the same as your calculation:

lba = ideinfo->capacity - ideinfo->sect;

However, I don't think the expression "fails". the way it is expressed now, it will divide something integer-wise and then multiply it with the same value (and then minus sect), thus I assume this was intended: To round the capacity value to the next multiple of (head * start), and then do a minus sect...

I don't think any hardcore programmer ever does a integerwise divide /before/ an integerwise multiply without a very good reason... (And don't give me that "you'd be surprised"!!!)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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