svn commit: r221449 - head/sys/geom/journal

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu May 5 13:13:22 UTC 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20110505/1141dc72/attachment.pgp


More information about the svn-src-head mailing list