Re: lots and lots of disks again

James Bottomley
2004-02-17T15:19:24Z

On Tue, 2004-02-17 at 09:49, Andries Brouwer wrote:
> On Mon, Feb 16, 2004 at 07:56:10PM -0500, James Bottomley wrote:
> > We also need to flip the switch entirely one way or the other for
> > increased partition numbers since a mixed scheme would be asking for an
> > admin nightmare.
>
> Why would that be?
>
> Suppose /dev/sdAA is (1049,0) and has 256 partitions.
> And /dev/sda is (8,0) and has 16 partitions.
> Where is the nightmare?

You're kidding, right?

Think of the code paths: at the moment we tell the gendisk the number of
minors we need when we register it. It then probes the partition tables
and fills in the values. If we have a large partition major, we need to
know *before* we call add_disk(). The only thing that determines this
is the on disc partitioning scheme, so now you need to know the
partition type before you register the gendisk. This type of layering
violation is a sure sign of a bad design.

Even assuming we can come up with a clean coding solution that doesn't
cause everyone to blow chunks when reading it, think what you've done to
the administrator of the system: Accidentally repartition a drive with
a big partition table and it migrates majors and device names. Also,
our device node assignment now isn't simply discovery order, it's
partition type order followed by discovery order.

The correct way to solve this is an all or nothing migration gated by a
boot time flag.

James