On 7 Sep 2014, at 11:23, Gleb Smirnoff <gleb...@freebsd.org> wrote:

> R> Modified: head/sys/sys/mbuf.h
> R> 
> ==============================================================================
> R> --- head/sys/sys/mbuf.h    Fri Sep  5 16:40:47 2014        (r271173)
> R> +++ head/sys/sys/mbuf.h    Fri Sep  5 16:46:28 2014        (r271174)
> R> @@ -672,7 +672,7 @@ m_clget(struct mbuf *m, int how)
> R>  {
> R>  
> R>    if (m->m_flags & M_EXT)
> R> -          printf("%s: %p mbuf already has cluster\n", __func__, m);
> R> +          printf("%s: %p mbuf already has external storage\n", __func__, 
> m);
> R>    m->m_ext.ext_buf = (char *)NULL;
> R>    uma_zalloc_arg(zone_clust, m, how);
> R>    /*
> R> @@ -698,7 +698,7 @@ m_cljget(struct mbuf *m, int how, int si
> R>    uma_zone_t zone;
> R>  
> R>    if (m && m->m_flags & M_EXT)
> R> -          printf("%s: %p mbuf already has cluster\n", __func__, m);
> R> +          printf("%s: %p mbuf already has external storage\n", __func__, 
> m);
> R>    if (m != NULL)
> R>            m->m_ext.ext_buf = NULL;
> 
> Shouldn't these be KASSERTs? I'm pretty sure that Andre put it as printf(9)
> because he was not sure it is correct. But since that time we never seen
> these prints in the wild, so they can be safely converted to KASSERTs.

Hi Gleb:

I agree that they should be KASSERT()s -- almost all if (x) panic(..) should be 
-- but was working offline at the time and so didn't have a chance to spelunk 
the mailing lists or GNATS/Bugzilla to see if I could find references to the 
panics so left the current form as is. I am currently on travel but have a TODO 
to do some spelunking when I get back. I spotted a number of other similar 
constructs in the mbuf code, which I'm currently working through fairly closely 
looking at the variable-size mbuf changes, which depend on a number of 
cleanups. (The ones I've made thus far are cosmetic, but less purely cosmetic 
ones will follow soon.)

Robert
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to