Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2008 16:36:32 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r184079 - stable/7/sbin/fsck_ffs
Message-ID:  <200810201636.m9KGaW0N075248@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Oct 20 16:36:32 2008
New Revision: 184079
URL: http://svn.freebsd.org/changeset/base/184079

Log:
  MFC r183821:
  Use old summary data for cg when bgfsck is performed.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sbin/fsck_ffs/   (props changed)
  stable/7/sbin/fsck_ffs/pass5.c

Modified: stable/7/sbin/fsck_ffs/pass5.c
==============================================================================
--- stable/7/sbin/fsck_ffs/pass5.c	Mon Oct 20 16:33:45 2008	(r184078)
+++ stable/7/sbin/fsck_ffs/pass5.c	Mon Oct 20 16:36:32 2008	(r184079)
@@ -291,10 +291,17 @@ pass5(void)
 				sump[run]++;
 			}
 		}
-		cstotal.cs_nffree += newcg->cg_cs.cs_nffree;
-		cstotal.cs_nbfree += newcg->cg_cs.cs_nbfree;
-		cstotal.cs_nifree += newcg->cg_cs.cs_nifree;
-		cstotal.cs_ndir += newcg->cg_cs.cs_ndir;
+		if (bkgrdflag != 0) {
+			cstotal.cs_nffree += cg->cg_cs.cs_nffree;
+			cstotal.cs_nbfree += cg->cg_cs.cs_nbfree;
+			cstotal.cs_nifree += cg->cg_cs.cs_nifree;
+			cstotal.cs_ndir += cg->cg_cs.cs_ndir;
+		} else {
+			cstotal.cs_nffree += newcg->cg_cs.cs_nffree;
+			cstotal.cs_nbfree += newcg->cg_cs.cs_nbfree;
+			cstotal.cs_nifree += newcg->cg_cs.cs_nifree;
+			cstotal.cs_ndir += newcg->cg_cs.cs_ndir;
+		}
 		cs = &fs->fs_cs(fs, c);
 		if (cursnapshot == 0 &&
 		    memcmp(&newcg->cg_cs, cs, sizeof *cs) != 0 &&



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