Subject: Re: devfs, was Re: ptyfs fully working now...
To: Bill Studenmund <>
From: Matthew Orgass <>
List: tech-kern
Date: 12/01/2004 07:12:18
On 2004-12-01 wrote:
>   I see now that what I have been forgetting is the basic wedge problem:
> wd0a no longer exists.  Insetad you have wdN that are disks, and wedgeN
> that are wedges; some number of wedges in no particular order are used to
> partition this disk (it might be a little more complex and/or different
> than that, I don't recall, but that is the basic problem).  I must have
> read this twenty times, but until now I didn't connect the dots.

  Ok, this just need major number cloning.  So you have wd0, the disk, and
wd0[a-*], which are the wedges used to partition wd0 and which have a
separate major number from wd1[a-*], and so on (in the symbolic node, wd0
is the major number).  The fact that wd0[a-*] corresponds to the
partitions on disk wd0 is assured by the usage of dkctl, which would gain
a "partition" command (and possibly a stronger link to assist locator
based lookup that associates major numbers for cross reference).
Basically what I am proposing is that major and minor numbers stay almost
exactly the way they are now, except that the "numbers" are now names and
major "numbers" can be cloned too.  This could be done in a mfs.

  Locator based lookup could then be implemented as a searchable database
(not a file system) that returns the cannonical name of devices that match
the query, keeping a reference that assures that no other device will use
that name if this device detaches while any references are held (but does
not provide direct access to the device).  Tools that use device names
could be modified to be able to use this search directly (attempting to
find the returned device in /dev), but would always tell the user the
cannonical name, which would be used in all other kernel/userland

Matthew Orgass