Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2010 23:29:38 -0300
From:      "Carlos A. M. dos Santos" <unixmania@gmail.com>
To:        Brian Somers <brian@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kirk McKusick <mckusick@freebsd.org>
Subject:   Re: svn commit: r212617 - head/sys/ufs/ffs
Message-ID:  <AANLkTikU6L8sjWi6cSWzK2wJqj7VAm5DSZ-YhQcZ49mP@mail.gmail.com>
In-Reply-To: <20100916014404.0409017f@dev.lan.Awfulhak.org>
References:  <201009141804.o8EI45kp088466@svn.freebsd.org> <20100916014404.0409017f@dev.lan.Awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 16, 2010 at 5:44 AM, Brian Somers <brian@freebsd.org> wrote:
> On Tue, 14 Sep 2010 18:04:05 +0000 (UTC) Kirk McKusick <mckusick@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:
>> =A0 Update comments in soft updates code to more fully describe
>> =A0 the addition of journalling. Only functional change is to
>> =A0 tighten a KASSERT.
>>
>> =A0 Reviewed by: =A0 =A0 =A0 =A0jeff Roberson
>>
>> Modified:
>> =A0 head/sys/ufs/ffs/ffs_softdep.c
>> =A0 head/sys/ufs/ffs/fs.h
>> =A0 head/sys/ufs/ffs/softdep.h
>>
>> Modified: head/sys/ufs/ffs/ffs_softdep.c
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>> --- head/sys/ufs/ffs/ffs_softdep.c =A0 =A0Tue Sep 14 17:22:06 2010 =A0 =
=A0 =A0 =A0(r212616)
>> +++ head/sys/ufs/ffs/ffs_softdep.c =A0 =A0Tue Sep 14 18:04:05 2010 =A0 =
=A0 =A0 =A0(r212617)
>> @@ -2378,7 +2378,8 @@ remove_from_journal(wk)
>> =A0 =A0 =A0 /*
>> =A0 =A0 =A0 =A0* We emulate a TAILQ to save space in most structures whi=
ch do not
>> =A0 =A0 =A0 =A0* require TAILQ semantics. =A0Here we must update the tai=
l position
>> - =A0 =A0 =A0* when removing the tail which is not the final entry.
>> + =A0 =A0 =A0* when removing the tail which is not the final entry. This=
 works
>> + =A0 =A0 =A0* only if the worklist linkage are at the beginning of the =
structure.
>> =A0 =A0 =A0 =A0*/
>> =A0 =A0 =A0 if (ump->softdep_journal_tail =3D=3D wk)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 ump->softdep_journal_tail =3D
>> @@ -2605,7 +2606,7 @@ jremref_write(jremref, jseg, data)
>> =A0 =A0 =A0 inoref_write(&jremref->jr_ref, jseg, rec);
>> =A0}
>>
>> -static =A0 =A0 =A0 void
>> +static void
>> =A0jmvref_write(jmvref, jseg, data)
>> =A0 =A0 =A0 struct jmvref *jmvref;
>> =A0 =A0 =A0 struct jseg *jseg;
>> @@ -2906,9 +2907,9 @@ complete_jseg(jseg)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 waiting =3D wk->wk_state & IOWAITING;
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 wk->wk_state &=3D ~(IOSTARTED | IOWAITING);
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 wk->wk_state |=3D COMPLETE;
>> - =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(i < jseg->js_cnt,
>> + =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(i++ < jseg->js_cnt,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ("handle_written_jseg: overflow %d >=
=3D %d",
> [.....]
>
> If INVARIANTS is not defined, the above i++ will not happen.

Which does not cause any harm, since "i" is a local variable, not used
anywhere else in the function. A picky compiler would complain,
however, that the variable is never read.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikU6L8sjWi6cSWzK2wJqj7VAm5DSZ-YhQcZ49mP>