From owner-svn-src-head@FreeBSD.ORG Mon Oct 13 14:05:01 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC4EC1065678; Mon, 13 Oct 2008 14:05:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DABD28FC16; Mon, 13 Oct 2008 14:05:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9DE51vO077978; Mon, 13 Oct 2008 14:05:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9DE51Zq077977; Mon, 13 Oct 2008 14:05:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810131405.m9DE51Zq077977@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 13 Oct 2008 14:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183822 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 14:05:02 -0000 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)