Module Name: src Committed By: martin Date: Thu Apr 4 12:50:03 UTC 2013
Modified Files: src/sys/arch/vax/include: disklabel.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/vax/include/disklabel.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/vax/include/disklabel.h diff -u src/sys/arch/vax/include/disklabel.h:1.6 src/sys/arch/vax/include/disklabel.h:1.7 --- src/sys/arch/vax/include/disklabel.h:1.6 Mon Jul 2 22:42:18 2012 +++ src/sys/arch/vax/include/disklabel.h Thu Apr 4 12:50:03 2013 @@ -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))