> Yep. Having to allocate/search for a device structure during open(2)
> is insane. It's wasteful. For ext2fs you can do it in lookup(), and
> for devfs (or similar) you can do the ideal thing: when the device
> entry is registered with the FS (i.e. only once).
No. We _must_ do it on ->open() for cases when it had been NULL. Driver
might be not there at ->lookup() time and hunting down all inodes with
give major/minor is insanity.
Now, if inode had been created by the driver - sure, we create the association
between it and <whatever>_device from the very beginning.
We must support device nodes on normal filesystems. Period. They are there
on tons of boxen and current support for device nodes on synthetic trees
is _not_ suitable for general use (== I'd question sanity of anyone using
it on production multiuser boxen).
Support for such beasts is there to stay. However, we shouldn't do things
that make allocation of new majors mandatory. IOW, as far as I'm concerned
solutions that do not allow "establish connection with foo_device upon
inode creation and don't bother with device number for that one" are
broken.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/