svn commit: r206560 - head/sys/fs/devfs

Jaakko Heinonen jh at FreeBSD.org
Thu Apr 15 13:02:03 UTC 2010


On 2010-04-14, Kostik Belousov wrote:
> First, I think we shall sort dirent->dd_dlist so that symlinks are
> located before any other entries, and allow for duplication of
> any name with the name of symlink.

What will happen when user deletes a symlink covering a device?
Uncovering the device may a bit surprising? If user created directories
will be allowed one day, they will face the same problem.

> I remember there was a PR to change devfs_symlink() so that symlink is
> added to dd_dlist into head, not to a tail, as it is done now.

kern/114057

> Assume that all full devfs pathes except symlinks are stored somewhere
> with type information for the component at the end.
> Then, just iterating this set at make_dev() time, we can verify that
> name is not a duplicate, and that the path components are not already
> used as device name (only as directories).
> The pathes storage need to be protected by dev_mtx. 
> 
> Possibly, the cdev_priv.c_dev.__si_namebuf may be reused at the
> cost of long check at the make_dev() time.

Could you elaborate on this? I am not sure if I understand what you mean
with __si_namebuf reuse.

> What do you think of this ?

I don't see anything obviously wrong with it.

-- 
Jaakko


More information about the svn-src-head mailing list