From owner-freebsd-geom@FreeBSD.ORG Tue Mar 16 00:01:40 2010 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4D981065672; Tue, 16 Mar 2010 00:01:40 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 148D38FC13; Tue, 16 Mar 2010 00:01:39 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B446B45E90; Tue, 16 Mar 2010 01:01:38 +0100 (CET) Received: from localhost (chello089077043238.chello.pl [89.77.43.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 537AA45CA6; Tue, 16 Mar 2010 01:01:33 +0100 (CET) Date: Tue, 16 Mar 2010 01:01:33 +0100 From: Pawel Jakub Dawidek To: Jaakko Heinonen Message-ID: <20100316000133.GC3574@garage.freebsd.pl> References: <20100315195059.GA1331@a91-153-117-195.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ncSAzJYg3Aa9+CRW" Content-Disposition: inline In-Reply-To: <20100315195059.GA1331@a91-153-117-195.elisa-laajakaista.fi> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-geom@FreeBSD.org Subject: Re: geom_label and directories under /dev X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 00:01:40 -0000 --ncSAzJYg3Aa9+CRW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 15, 2010 at 09:51:00PM +0200, Jaakko Heinonen wrote: >=20 > Hi, >=20 > 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: >=20 > - empty label > - "." and ".." > - labels starting or ending with '/' > - labels ending with /.. (Due to a bug for example /..foo/.. is > allowed.) >=20 > Then I noticed that directories are also problematic. Here's how to > panic your system: >=20 > # glabel create ab ad0 > # glabel create ab/cd ad0 > # ls -l /dev/label >=20 > I was going to suggest disallowing of '/' in labels but in past such > change has been reverted. >=20 > ------------------------------------------------------------------------ > r149339 | pjd | 2005-08-20 20:05:47 +0300 (Sat, 20 Aug 2005) | 5 lines >=20 > Back-out the change from revision 1.14 and allow for '/' in labels > again. >=20 > Convinced by: green, Gavin Atkinson, dougb, gordon > MFC after: 1 day >=20 > ------------------------------------------------------------------------ >=20 > 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:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ncSAzJYg3Aa9+CRW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkueylwACgkQForvXbEpPzS7IwCg9TmWyU04nzx6qLgHSN5z1CLz J7YAnj6z1fscqR6JlP3DcBnnngI4kVSV =zZMZ -----END PGP SIGNATURE----- --ncSAzJYg3Aa9+CRW--