From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 02:55:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FD91065670; Fri, 17 Sep 2010 02:55:07 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 3586C8FC08; Fri, 17 Sep 2010 02:55:06 +0000 (UTC) Received: by qyk31 with SMTP id 31so351407qyk.13 for ; Thu, 16 Sep 2010 19:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wB/xaDFrF/u7defmOmYyNymSu9gpBwlzsAkWcg/EFDg=; b=othKVOWQpaTAQyfKTRyeVP3T5Ibtqzbq+YCfjZDwsjeiYomMYaVJ2ji7yYCpGJ5xyg lJLDx6yd605dvDWw1O9cLf2OGj//pDRIoEnXKnwmTnP+ljDavoF0OiBys72tRt95jnKn er7vKfZj3armwe9cA78HNuYMlw5wIDqk8uQ4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=t3mHasMx41T+xBHQifmvGW39Ldq+/Dc9j3SFaaaOsGKoZb91LqJ/Iqr/lyDlABmnQi IabwWBLJOVq02DPG6t4+yPc6kahvXb2mOjMob711gWU7XxfQbvf8NdHRPEjrLos2Q0VL 2n+4OTnI5AF0flxMbd2CxgPfq0t+qgE3Eur4k= MIME-Version: 1.0 Received: by 10.224.97.15 with SMTP id j15mr2819239qan.199.1284690578351; Thu, 16 Sep 2010 19:29:38 -0700 (PDT) Received: by 10.229.211.9 with HTTP; Thu, 16 Sep 2010 19:29:38 -0700 (PDT) In-Reply-To: <20100916014404.0409017f@dev.lan.Awfulhak.org> References: <201009141804.o8EI45kp088466@svn.freebsd.org> <20100916014404.0409017f@dev.lan.Awfulhak.org> Date: Thu, 16 Sep 2010 23:29:38 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Brian Somers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kirk McKusick Subject: Re: svn commit: r212617 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 02:55:08 -0000 On Thu, Sep 16, 2010 at 5:44 AM, Brian Somers wrote: > On Tue, 14 Sep 2010 18:04:05 +0000 (UTC) Kirk McKusick 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.