Re: Weird partititon recocnising problem in 2.6.0-testX

From: Rogier Wolff
Date: Fri Nov 14 2003 - 03:21:28 EST


On Mon, Nov 10, 2003 at 05:02:36PM +0100, Andries.Brouwer@xxxxxx wrote:
>
> Boot a kernel that remaps, say vanilla 2.4.

[...]

> Now boot a kernel that does not remap. Since you won't see

[...]

All this rebooting into kernels that DO or DON'T remap would have been
unneccesary if the remapping would not have cloned block 1 to appear
in block 0, but would just have swapped them.

In remapped mode, you now read block 1 wether you seek to block 0 or 1.
If the remapping would have swapped them, just copying over the block
from block 1 to block 0 would have allowed the removal of the stupid
remapping.

ide.c:1381
/* Yecch - this will shift the entire interval,
possibly killing some innocent following sector */
if (block == 0 && drive->remap_0_to_1 == 1)
block = 1; /* redirect MBR access to EZ-Drive partn table */

should have been:

if ((block <= 1) && drive->remap_0_to_1)
block ^= 1;

(IMHO, it's not worth going in and fixing this for say 2.4 or 2.6
kernels(*), but it IS worth noting and not making the same mistake again in
the future.....)

Roger.

(*) For example because that would change established behaviour which is
bad and can lead to surprises. If we'd change it, Andries' "how to fix"
emails would become even longer: He'd have to start: IF you have a
modern kernel, you can just ... but otherwise you'll have to .... and
then comes the whole mess I didn't fully quote.....

--
** R.E.Wolff@xxxxxxxxxxxx ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
**** "Linux is like a wigwam - no windows, no gates, apache inside!" ****
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/