On Tue, Mar 15, 2011 at 2:06 AM, Michael Cree <mcree@xxxxxxxxxxxx> wrote: > v2.6.38 boot reports it can't recognise the partition table on the system > disk on my Alpha and panics when it can't find the root device. > > It worked at v2.6.38-rc7. > > While I haven't done a bisect to fully verify I nevertheless suggest the > following patch as the likely cause: > > 1eafbfe Fix corrupted OSF partition table parsing That sounds likely. What does something like the attached do? In particular, what's the printed-out value of the OSF npartitions thing? Also, it's quite possible that we should raise the value of MAX_OSF_PARTITIONS. If I checked it right, the d_partitions[] array starts at byte offset 148 in the sector, and it's 16 bytes in size, so there _could_ be up to 22 partitions there. The fact that we had defined the 'struct disklabel' to only contain 8 partitions is I think from documentation, not a technical "there can be only eight". Linus
fs/partitions/osf.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/partitions/osf.c b/fs/partitions/osf.c index be03a0b..fcab201 100644 --- a/fs/partitions/osf.c +++ b/fs/partitions/osf.c @@ -68,8 +68,8 @@ int osf_partition(struct parsed_partitions *state) } npartitions = le16_to_cpu(label->d_npartitions); if (npartitions > MAX_OSF_PARTITIONS) { - put_dev_sector(sect); - return 0; + printk("OSF: %u partitions\n", npartitions); + npartitions = MAX_OSF_PARTITIONS; } for (i = 0 ; i < npartitions; i++, partition++) { if (slot == state->limit)