From owner-freebsd-geom@FreeBSD.ORG Wed Oct 13 09:10:02 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 EE4291065672 for ; Wed, 13 Oct 2010 09:10:02 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id A2FED8FC08 for ; Wed, 13 Oct 2010 09:10:02 +0000 (UTC) Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id 37EDC21671C for ; Wed, 13 Oct 2010 11:50:26 +0300 (EEST) Date: Wed, 13 Oct 2010 11:50:26 +0300 From: Jaakko Heinonen To: freebsd-geom@FreeBSD.org Message-ID: <20101013085025.GB54686@jh> References: <20101007180657.GA1383@a91-153-123-205.elisa-laajakaista.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101007180657.GA1383@a91-153-123-205.elisa-laajakaista.fi> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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 09:10:03 -0000 [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. -- Jaakko