Subject: Re: Increased nr of partitions ?
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Robert Elz <kre@munnari.OZ.AU>
List: netbsd-help
Date: 09/04/2000 09:12:05
    Date:        Sun, 3 Sep 2000 17:44:34 +0200
    From:        Manuel Bouyer <bouyer@antioche.lip6.fr>
    Message-ID:  <20000903174434.A517@antioche.eu.org>

  | with 8 partitons, wd0a has minor 0, wd0h minor 7 and wd1a minor 8
  | (see the DISKUNIT, DISKPART and DISKMINOR macros). With 16 partitons,
  | miror 8 becomes wd0i and wd1a has minor 16.

Only if the mapping from minor(dev) to partition remains the simple form
that it currently takes (the low N bits).   It doesn't have to.  It would
not be totally unreasonable to have the partition number taken from the
low 3 bits of the minor dev, then skip (say) 10-12 bits for the device
number, then use the remaining 5-7 bits for the rest of the partition number.
That would allow between 256 and 1024 partitions/device, which is way
more than can possibly fit in a label anyway (or be named using the XdNx
naming scheme).

That way, all existing /dev entries remain meaning exactly what they
currently mean (not unlike the massaging of bits from a 32 bit dev_t into the
major(dev) and minor(dev) so the world remains compatible with 16 bit dev_t)

This would end up making a dev_t examined in binary a fairly unfathomable
beast, but I'm not sure that really matters all that much any more.

kre