diff options
author | kib <kib@FreeBSD.org> | 2008-10-13 14:05:01 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-10-13 14:05:01 +0000 |
commit | f2993add72298f291a17b3b1f2d96011e252b26d (patch) | |
tree | 240c01e6fcdaa4c9535177ec7d408d948b7f0c7c | |
parent | 042990e0410fe3c6471eb9fcd91a863a780423d9 (diff) | |
download | FreeBSD-src-f2993add72298f291a17b3b1f2d96011e252b26d.zip FreeBSD-src-f2993add72298f291a17b3b1f2d96011e252b26d.tar.gz |
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
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 7 |
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) |