Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2008 14:05:01 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r183822 - head/sys/ufs/ffs
Message-ID:  <200810131405.m9DE51Zq077977@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Oct 13 14:05:01 2008
New Revision: 183822
URL: http://svn.freebsd.org/changeset/base/183822

Log:
  Sync up summary information for cylinder groups while data is already
  in memory during snapshot creation. This improves the results of the
  background fsck.
  
  Submitted by: tegge
  MFC after: 1 week

Modified:
  head/sys/ufs/ffs/ffs_snapshot.c

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Mon Oct 13 14:01:05 2008	(r183821)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Mon Oct 13 14:05:01 2008	(r183822)
@@ -864,6 +864,13 @@ cgaccount(cg, vp, nbp, passno)
 	}
 	UFS_LOCK(ip->i_ump);
 	ACTIVESET(fs, cg);
+	/*
+	 * Recomputation of summary information might not have been performed
+	 * at mount time.  Sync up summary information for current cylinder
+	 * group while data is in memory to ensure that result of background
+	 * fsck is slightly more consistent.
+	 */
+	fs->fs_cs(fs, cg) = cgp->cg_cs;
 	UFS_UNLOCK(ip->i_ump);
 	bcopy(bp->b_data, nbp->b_data, fs->fs_cgsize);
 	if (fs->fs_cgsize < fs->fs_bsize)



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