geom_label and directories under /dev

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Mar 16 00:01:40 UTC 2010


On Mon, Mar 15, 2010 at 09:51:00PM +0200, Jaakko Heinonen wrote:
> 
> Hi,
> 
> I was working to fix problems with GEOM label class allowing some
> problematic label names which can't represent proper files under /dev.
> For example:
> 
> - empty label
> - "." and ".."
> - labels starting or ending with '/'
> - labels ending with /.. (Due to a bug for example /..foo/.. is
>   allowed.)
> 
> Then I noticed that directories are also problematic. Here's how to
> panic your system:
> 
> # glabel create ab ad0
> # glabel create ab/cd ad0
> # ls -l /dev/label
> 
> I was going to suggest disallowing of '/' in labels but in past such
> change has been reverted.
> 
> ------------------------------------------------------------------------
> r149339 | pjd | 2005-08-20 20:05:47 +0300 (Sat, 20 Aug 2005) | 5 lines
> 
> Back-out the change from revision 1.14 and allow for '/' in labels
> again.
> 
> Convinced by:   green, Gavin Atkinson, dougb, gordon
> MFC after:      1 day
> 
> ------------------------------------------------------------------------
> 
> So it's probably a dead end to try to suggest disallowing of '/'?
> Unfortunately it's not easy to fix all problems with directories. For
> starters devfs doesn't support removal of directories at all.

Well, disallowing '/' in glabel(8) is not going fix devfs, is it?:)

What you described are bugs in devfs that should be fixed in devfs and
not worked around by limiting GEOM flexibility. Allowing '/' in labels
is very useful. Not only labels, you can do the same with gmirror(8),
gstripe(8), etc. although with glabel(8) it is more important.

Devfs allows to create multiple entiries with the same name and this is
bug, file system shouldn't allow that.

I'd suggest take the time and fix the bugs properly. It is FreeBSD, so
do it right:)

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20100316/d64e28ee/attachment.pgp


More information about the freebsd-geom mailing list