Subject: Re: Increasing maximum partition to 16
To: Matthias Scheler <tron@zhadum.de>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 12/28/2000 10:39:26
hi,

actually this change is not completely backward compatible.
if someone has created device nodes with those upper minor bits set
(ie. for /dev/sd385792385a or whatever the number turns out to be),
then those device nodes would no longer refer to the same device
after this change.  to me, this falls into the same category as
the problem that __BROKEN_CONFIG_UNIT_USAGE indicates, that we make
assumptions about the usage of device minor numbers.  in this case
the assumption is that the upper bits of the minor number have not
been used by anyone anywhere.

the only completely backward-compatible way to increase the number
of partitions is to create a new device major number for each current
device major that uses part of its minor as a partition.

I think we should consider a logical volume manager design
rather than continuing to fiddle with fixed-partitioning.

-Chuck


On Thu, Dec 28, 2000 at 05:29:34PM +0000, Matthias Scheler wrote:
> 	Hello,
> 
> I've attached changes for NetBSD-current which give the i386 port a maximum
> of 16 partitions per disk:
> 
> tron@lyssa:~#df
> Filesystem            1K-blocks     Used     Avail Capacity  Mounted on
> [...]
> /dev/vnd0l                31727        1     30139       0%    /mnt/l
> 
> The changes are:
> 
> + completely backward compatible (new kernel works with old device nodes)
> + easily reusable for other ports like e.g. alpha or sparc
> 
> The trick is to use some extra upper bits of the minor device number for
> the partition.
> 
> 	Kind regards
>