On Wed, May 04, 2011 at 06:06:40PM +0000, Andrey V. Elsukov wrote: > Author: ae > Date: Wed May 4 18:06:40 2011 > New Revision: 221449 > URL: http://svn.freebsd.org/changeset/base/221449 > > Log: > Removed KASSERT, g_new_providerf() can not fail.
Well, the assertion was there to prepare us for times when g_new_providerf() will be able to fail. I was suspecting we might want to make g_new_providerf() to fail when the given name is already in use. In such case we use to create two identical entries in /dev/, not sure what we do now (panic?). > Modified: > head/sys/geom/journal/g_journal.c > > Modified: head/sys/geom/journal/g_journal.c > ============================================================================== > --- head/sys/geom/journal/g_journal.c Wed May 4 17:58:15 2011 > (r221448) > +++ head/sys/geom/journal/g_journal.c Wed May 4 18:06:40 2011 > (r221449) > @@ -2097,7 +2097,6 @@ g_journal_worker(void *arg) > gp = sc->sc_geom; > g_topology_lock(); > pp = g_new_providerf(gp, "%s.journal", sc->sc_name); > - KASSERT(pp != NULL, ("Cannot create %s.journal.", sc->sc_name)); > pp->mediasize = sc->sc_mediasize; > /* > * There could be a problem when data provider and journal providers -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com
pgp0VnxRUbAas.pgp
Description: PGP signature