From owner-freebsd-geom@FreeBSD.ORG Wed Oct 13 16:53:57 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 BA9FD106566B for ; Wed, 13 Oct 2010 16:53:57 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 8446D8FC12 for ; Wed, 13 Oct 2010 16:53:57 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o9DGfppA085606 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 13 Oct 2010 09:41:52 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4CB5E14B.9070308@feral.com> Date: Wed, 13 Oct 2010 09:41:47 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: freebsd-geom@freebsd.org References: <20101007180657.GA1383@a91-153-123-205.elisa-laajakaista.fi> <20101013085025.GB54686@jh> In-Reply-To: <20101013085025.GB54686@jh> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.6 (ns1.feral.com [192.168.221.1]); Wed, 13 Oct 2010 09:41:52 -0700 (PDT) Subject: Re: HEADS UP: device name checking on device registration 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: Wed, 13 Oct 2010 16:53:57 -0000 I think this seems good. Perhaps you could also fix devfs to not panic when somebody tries to make a device that already exists and just return an error with a diagnostic while you're at it? On 10/13/2010 1:50 AM, Jaakko Heinonen wrote: > [Posting a patch to -geom for comments.] > > On 2010-10-07, Jaakko Heinonen wrote: >> Currently several GEOM classes (notably geom_label) allow to create >> devices with invalid names. Below is a link to a patch which converts >> g_dev_taste() to use make_dev_p() with MAKEDEV_CHECKNAME flag. It's not >> a complete solution and essentially changes the panic to a printf. > What do you think about this patch? > > http://people.freebsd.org/~jh/patches/geom_dev-checkname.2.diff > > Any better ideas how to handle this in GEOM? It doesn't seem to be > trivial to propagate an error from g_dev_taste() due to asynchronous > nature of the device registration in GEOM. >