Subject: Re: Partition tables (was: Re: Another changer, another changer
To: David Holland <>
From: Gandhi woulda smacked you <>
List: current-users
Date: 10/10/1998 12:27:49
Idea for the partition table thing:

I know we're not necessarily in favour of using YA+DN (Yet Another
Major Device Number); I think that YA-DN for partition tables
makes things really ugly, myself.

Here, though, is an idea, and it kind of falls into the static-dynamic
kind of issues, and it's a node which can be remade via MAKEDEV.  Bear
with me, here, as I obviously don't have details fleshed out just

What about a single major device that has a minor device corresponding
to _probe order_ of the devices (I know we hate that, but
we don't need the partition table proper available until we format
the disks, I think (...or Did I Miss Something Here[TM]?).

Or, no wait wait I got it :-)

We could actually have a single device to which you send requests,
i.e. /dev/diskpart, and you do something like

struct diskaccess da[1];	/* contains a struct diskpart */


fd=open("/dev/diskpart", O_RDWR)
ioctl(fd, DKIOCGDTAB, &da);

and the diskpart driver would automagically handle the routing.

This would require a serious rewrite, but it would be worth the trouble
in the long run, I think.  One major device number, one minor device
number.  No waste, no fuss, no mess, and considering how rarely the
disk partition table itself is really used (format, disklabel, maybe
mount, maybe fsck), performance shouldn't be that much of an issue.

Friends don't let friends use Microsoft.