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)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to