tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (Semi-random) thoughts on device tree structure and devfs



On Wed, Mar 10, 2010 at 02:03:53AM +0900, Masao Uebayashi wrote:
> > I don't see a problem.  Let the kernel read the partition table,
> > iterate over the partitions, extract properties from each partition,
> > try to match a dk to each partition by properties (e.g., guid(dk3)
> > == guid(partition 7 at sd0)).  If there is a match, take the dk unit
> > number from the matching property list (e.g., dk3).  If there is no
> > match, choose a unit number that is used by neither a device_t or a
> > configuration properties list.
> 
> That way you teach lots of knowledge into dk(4).  That's what I don't like
> to do.

The code providing DKWEDGE_METHOD_GPT already has the knowledge.  I
don't think that the knowledge has to move from there.  All that dk(4)
has to do is to match device-properties lists, and for that it can use
the same library function as every other match routine will use.

> Now you pass GUID from kernel config, what is the point to have the predefined
> unit number 3?

The point is to make the device node, /dev/dk3, a reliable handle for
the volume.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index