Partition check order in fs/partition/check.c?

Peter Oberparleiter (oberpapr@softhome.net)
Tue, 1 Apr 2003 11:33:03 +0200


Hi,

I've got a few questions regarding partition checks in fs/partition/*.c of
both Linux 2.4 and 2.5:

I ran into a situation in which an MSDOS partition table was incorrectly
interpreted as an ACORN POWERTEC partition table, resulting in no valid
partition being found. When I looked at fs/partition/acorn.c I noticed that
the powertec partition check is kept fairly generic (adding bytes 1..511 of
the MBR plus an offset and comparing the result with byte 512). In addition
to this, the acorn-specific set of partition checks comes first in the list
in fs/partition/check.c so that statistically, every one in 256 MSDOS
partition tables (they got a fixed pattern at bytes 511 and 512) would be
incorrectly identified as POWERTEC.

Now for the actual questions: what is the reason for the order of partition
checks as it is? Couldn't the acorn tests be moved further down in the list
to solve this particular problem? Also, is there a way to make the acorn test
more specific?

A workaround for this problem would of course be to deselect the
CONFIG_ACORN_PARTITION_POWERTEC option, but that wouldn't work in cases both
acorn and msdos partition tables are used.

Thanks in advance for any kind of insight into this matter.

Regards,
Peter Oberparleiter
-
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/