From f2993add72298f291a17b3b1f2d96011e252b26d Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 13 Oct 2008 14:05:01 +0000 Subject: 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 --- sys/ufs/ffs/ffs_snapshot.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/ufs/ffs') diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index fab6798..20fbefc 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -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) -- cgit v1.1