[cgl_discussion] devfs & CGL
mochel at osdl.org
Thu Feb 6 17:03:12 PST 2003
On Thu, 6 Feb 2003, Steven Dake wrote:
> In the current implementation for ga mapping (mapping a scsi device for
> a disk in a certain slot/chassis), we do use devfs. I've come to my
> senses and I am going to change this in our CGE 3.1 product to make
> enumeration of those devices take place in userspace without the need
> for devfs. Also, the work I have done on our automatic storage
> multipathing enumeration occurs in userspace, following this philosophy.
> The work Mark Bellon is doing for device enumeration (the next-gen
> MontaVista HDI work) is based in userspace and does not depend on devfs
> at all.
> devfs is an interesting idea, but controlling naming/permission policy
> in kernel has its share of problems. The only downside to controlling
> permission/naming in userspace is it is currently done in a static form
> via MAKEDEV which is inapproriate for a variety of reasons.
I am glad to hear that you're moving away from devfs as a solution. :)
Maintaining that policy in the kernel is definitely the wrong thing to do.
By keeping that policy in userspace, you are able to extend and scale
almost without bound. So, we agree. :)
However, I don't understand what you mean by 'static'. Solutions that were
discussed at the kernel summit, and in private conversations with Greg KH
and Linus, involved having some sort of userspace database, which could be
updated by a user at any time.
Although, the permissions would only be set once, when a device node was
created (e.g. after a device was inserted). Subsequent permission changes
would not automatically modify existing permissions on device nodes
(though this a behavioral issue of the agent providing the permission-
> This is why a next-generation HDI solution is needed to solve the naming
> problem in userspace, not in the kernel (with some kernel help to tell
> userspace of insertions/extractions that the hardware may be aware of).
This help, I presume, is /sbin/hotplug. Greg and I have been working on
infrastructure to provide a good, mainstream solution for persistant
device naming using sysfs and /sbin/hotplug for 2.5/2.6. I hope that we
can align our efforts to provide a single solution for this problem..
More information about the cgl_discussion