Re: [GIT PATCH] driver core patches for 2.6.31-git

Kay Sievers
2009-09-16T13:59:43Z

On Wed, Sep 16, 2009 at 15:15, Christoph Hellwig <hch@infradead.org> wrote:
> On Wed, Sep 16, 2009 at 05:59:19AM -0700, Greg KH wrote:

> It's a very bad way to expose kernel state, and the same problem the
> original devfs had.  A good kernel state filesystem is immutable to
> changes from userspace, that is fully controlled by the kernel.  The
> problem with devfs and your new devfstmpfs is that you have both
> userspace and the kernel manipulating the same object.  Which for
> example makes life time management impossible.

It's well defined. When the device goes away, the node is removed, in
the same way the sysfs device is removed, and if userspace has
created/replaced the node, it has control over it and the kernel does
not touch it anymore. There is no known problem with that and no
difference how udev works today on all common systems.

If wanted, at the time you guys come up with a working union-mount, we
can make the kernel-maintained dev-filesystem read-only and mount a
tmpfs on-top of it. But we are not there at the moment.

> I also know who gladly killed it

And for good reason. The naming scheme was as wrong as it could be. We
have a completely different situation today.

> just to re-introduce the same thing years later,

It's not the same at all. There is udev today, and a well-defined way
to work with /dev, synchronized across all distros. Nothing really
changes with devtpmfs, it just gets simpler, has less races, and is a
lot more reliable.

It's a logical extension to sysfs, not much more. We create all the
things in /sys, why shouldn't we create the few nodes too, and make
many things much easier?

Kay