Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Apr 2010 16:01:56 +0300
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r206560 - head/sys/fs/devfs
Message-ID:  <20100415130155.GA3017@a91-153-117-195.elisa-laajakaista.fi>
In-Reply-To: <20100414154248.GR2415@deviant.kiev.zoral.com.ua>
References:  <201004131853.o3DIrdOT035078@svn.freebsd.org> <20100414084037.GK2415@deviant.kiev.zoral.com.ua> <20100414124912.GA2950@a91-153-117-195.elisa-laajakaista.fi> <20100414130343.GO2415@deviant.kiev.zoral.com.ua> <20100414141959.GA3276@a91-153-117-195.elisa-laajakaista.fi> <20100414154248.GR2415@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100415130155.GA3017>