Date: Wed, 13 Oct 2010 17:33:32 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Jaakko Heinonen <jh@freebsd.org> Cc: freebsd-geom@freebsd.org Subject: Re: HEADS UP: device name checking on device registration Message-ID: <20101013143332.GC2392@deviant.kiev.zoral.com.ua> In-Reply-To: <20101013085025.GB54686@jh> References: <20101007180657.GA1383@a91-153-123-205.elisa-laajakaista.fi> <20101013085025.GB54686@jh>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Wed, Oct 13, 2010 at 11:50:26AM +0300, 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. You might consider creating some well-controlled name instead of failed one, and printing a diagnostic describing what happen. /dev/reservation/<serial number> could be an example, also demonstrating my lack of imagination. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAky1wzwACgkQC3+MBN1Mb4hXbACdHwMPcm6DaXhkZfbdbAmUKjy4 fIYAn3AqkWxqBwQmzXw1Kg7TnE7IIqVt =J8XA -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101013143332.GC2392>
