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
This commit is contained in:
Konstantin Belousov 2008-10-13 14:05:01 +00:00
parent e6e1a3a875
commit 4560452f01
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183822

View File

@ -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)