summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ufs/ffs/ffs_snapshot.c')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c7
1 files changed, 7 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud