From 35d9a96a440c9df975e73b2f541d6489f5339761 Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 4 Apr 2013 12:50:03 +0000 Subject: [PATCH] Drop MAXPARTITIONS down to 12 - we do not have more space to store a larger disklabel in the bootblocks at least on some supported machines. Keep the extended major/minor sheme compatible with the 6.0 release and note that we had a bigger MAXPARTITIONS in between. --- sys/arch/vax/include/disklabel.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/arch/vax/include/disklabel.h b/sys/arch/vax/include/disklabel.h index 62e00e22d5fa..0a12c38026f4 100644 --- a/sys/arch/vax/include/disklabel.h +++ b/sys/arch/vax/include/disklabel.h @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.h,v 1.6 2012/07/02 22:42:18 abs Exp $ */ +/* $NetBSD: disklabel.h,v 1.7 2013/04/04 12:50:03 martin Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -36,16 +36,24 @@ #define LABELUSESMBR 0 /* no MBR partitionning */ #define LABELSECTOR 0 /* sector containing label */ #define LABELOFFSET 64 /* offset of label in sector */ -#define MAXPARTITIONS 16 /* number of partitions */ +#define MAXPARTITIONS 12 /* number of partitions */ #define OLDMAXPARTITIONS 8 /* number of partitions before nb-6 */ #define RAW_PART 2 /* raw partition: xx?c */ +/* + * In NetBSD 6 we eroneously used a too large MAXPARTITIONS value (disklabel + * overlapped with important parts of the bootblocks and made some machines + * unbootable). + */ +#define __TMPBIGMAXPARTITIONS 16 /* compatibility with 6.0 installs */ /* * We use the highest bit of the minor number for the partition number. * This maintains backward compatibility with device nodes created before * MAXPARTITIONS was increased. + * Temporarily MAXPARTITIONS was 16, so we use that to keep compatibility + * with existing installations. */ -#define __VAX_MAXDISKS ((1 << 20) / MAXPARTITIONS) +#define __VAX_MAXDISKS ((1 << 20) / __TMPBIGMAXPARTITIONS) #define DISKUNIT(dev) ((minor(dev) / OLDMAXPARTITIONS) % __VAX_MAXDISKS) #define DISKPART(dev) ((minor(dev) % OLDMAXPARTITIONS) + \ ((minor(dev) / (__VAX_MAXDISKS * OLDMAXPARTITIONS)) * OLDMAXPARTITIONS))