Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/vax/include Drop MAXPARTITIONS down to 12 - we do n...



details:   https://anonhg.NetBSD.org/src/rev/7816160bdef8
branches:  trunk
changeset: 785879:7816160bdef8
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 04 12:50:03 2013 +0000

description:
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.

diffstat:

 sys/arch/vax/include/disklabel.h |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 85878f0cf88c -r 7816160bdef8 sys/arch/vax/include/disklabel.h
--- a/sys/arch/vax/include/disklabel.h  Thu Apr 04 12:48:07 2013 +0000
+++ b/sys/arch/vax/include/disklabel.h  Thu Apr 04 12:50:03 2013 +0000
@@ -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))



Home | Main Index | Thread Index | Old Index