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 Tue, 9 Mar 2010, Joerg Sonnenberger wrote:

> On Tue, Mar 09, 2010 at 08:09:57AM +0000, Iain Hibbert wrote:
> > I have never used wedges but, for the disk case, would it not be better to
> > make a method of configuring a dk in advance, so that whenever a disk
> > appears with the correct parameters it will already be mapped to the dk
> > you expect? (perhaps a daemon could handle it) Then you know that /dev/dk3
> > is your USB stick and will never be anything else..
> I don't think it has to be or should be in the kernel. Basically,
> /dev/dk3 gets created or is used by the kernel. A daemon is notified
> (*cough* udevd) and that scans the device properties, finds the UUID and
> creates /dev/uuid/2345324523453245. It also finds the label and creates
> /dev/label/my-usb-stick. The latter is what you put in /etc/fstab.

Sorry I got confused - in your method, what is dk3 needed for?

What I suggested then, was a daemon that waits for a disk device to
appear, then it can probe the disk and configure the appropriate dk(4)
device. If it determines that the device is your USB stick then it
configures as dk3. Otherwise, just put it as eg dk7. The admin knows that
/dev/dk3 is normal and can arrange permissions accordingly so that you can
access it, but dk7 can be restricted (thats for the paranoid admin)

Then, I'm not sure why /dev/uuid/* and /dev/label/* would be necessary?
(sure, they would be 'nice' to have)


Home | Main Index | Thread Index | Old Index