svn commit: r212617 - head/sys/ufs/ffs

Brian Somers brian at FreeBSD.org
Thu Sep 16 08:59:11 UTC 2010


On Tue, 14 Sep 2010 18:04:05 +0000 (UTC) Kirk McKusick <mckusick at FreeBSD.org> wrote:
> Author: mckusick
> Date: Tue Sep 14 18:04:05 2010
> New Revision: 212617
> URL: http://svn.freebsd.org/changeset/base/212617
> 
> Log:
>   Update comments in soft updates code to more fully describe
>   the addition of journalling. Only functional change is to
>   tighten a KASSERT.
>   
>   Reviewed by:	jeff Roberson
> 
> Modified:
>   head/sys/ufs/ffs/ffs_softdep.c
>   head/sys/ufs/ffs/fs.h
>   head/sys/ufs/ffs/softdep.h
> 
> Modified: head/sys/ufs/ffs/ffs_softdep.c
> ==============================================================================
> --- head/sys/ufs/ffs/ffs_softdep.c	Tue Sep 14 17:22:06 2010	(r212616)
> +++ head/sys/ufs/ffs/ffs_softdep.c	Tue Sep 14 18:04:05 2010	(r212617)
> @@ -2378,7 +2378,8 @@ remove_from_journal(wk)
>  	/*
>  	 * We emulate a TAILQ to save space in most structures which do not
>  	 * require TAILQ semantics.  Here we must update the tail position
> -	 * when removing the tail which is not the final entry.
> +	 * when removing the tail which is not the final entry. This works
> +	 * only if the worklist linkage are at the beginning of the structure.
>  	 */
>  	if (ump->softdep_journal_tail == wk)
>  		ump->softdep_journal_tail =
> @@ -2605,7 +2606,7 @@ jremref_write(jremref, jseg, data)
>  	inoref_write(&jremref->jr_ref, jseg, rec);
>  }
>  
> -static	void
> +static void
>  jmvref_write(jmvref, jseg, data)
>  	struct jmvref *jmvref;
>  	struct jseg *jseg;
> @@ -2906,9 +2907,9 @@ complete_jseg(jseg)
>  		waiting = wk->wk_state & IOWAITING;
>  		wk->wk_state &= ~(IOSTARTED | IOWAITING);
>  		wk->wk_state |= COMPLETE;
> -		KASSERT(i < jseg->js_cnt,
> +		KASSERT(i++ < jseg->js_cnt,
>  		    ("handle_written_jseg: overflow %d >= %d",
[.....]

If INVARIANTS is not defined, the above i++ will not happen.

-- 
Brian Somers                                          <brian at Awfulhak.org>
Don't _EVER_ lose your sense of humour !               <brian at FreeBSD.org>


More information about the svn-src-all mailing list