From owner-cvs-all@FreeBSD.ORG Mon Feb 28 16:04:53 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7514D16A4CE; Mon, 28 Feb 2005 16:04:53 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BC7243D53; Mon, 28 Feb 2005 16:04:53 +0000 (GMT) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1SG4raJ036003; Mon, 28 Feb 2005 16:04:53 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1SG4r3Q036002; Mon, 28 Feb 2005 16:04:53 GMT (envelope-from delphij) Message-Id: <200502281604.j1SG4r3Q036002@repoman.freebsd.org> From: Xin LI Date: Mon, 28 Feb 2005 16:04:53 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sbin/fsck_ffs fsck.h pass5.c src/sys/ufs/ffs ffs_alloc.c ffs_softdep.c fs.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 16:04:53 -0000 delphij 2005-02-28 16:04:53 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sbin/fsck_ffs fsck.h pass5.c sys/ufs/ffs ffs_alloc.c ffs_softdep.c fs.h Log: MFC: Transferr the responsibility of recomputation of the superblock summary to background fsck. This will improve startup speed when mounting a large volume. Original commit log: The recomputation of file system summary at mount time can be a very slow process, especially for large file systems that is just recovered from a crash. Since the summary is already re-sync'ed every 30 second, we will not lag behind too much after a crash. With this consideration in mind, it is more reasonable to transfer the responsibility to background fsck, to reduce the delay after a crash. Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to control this behavior. When set to nonzero, we will get the "old" behavior, that the summary is computed immediately at mount time. Add five new sysctl variables to adjust ndir, nbfree, nifree, nffree and numclusters respectively. Teach fsck_ffs about these API, however, intentionally not to check the existence, since kernels without these sysctls must have recomputed the summary and hence no adjustments are necessary. This change has eliminated the usual tens of minutes of delay of mounting large dirty volumes. Reviewed by: mckusick Revision Changes Path 1.35 +5 -0 src/sbin/fsck_ffs/fsck.h 1.41 +55 -0 src/sbin/fsck_ffs/pass5.c 1.132 +68 -1 src/sys/ufs/ffs/ffs_alloc.c 1.176 +12 -3 src/sys/ufs/ffs/ffs_softdep.c 1.48 +6 -1 src/sys/ufs/ffs/fs.h Revision Changes Path 1.31.2.4 +5 -0 src/sbin/fsck_ffs/fsck.h 1.39.2.2 +55 -0 src/sbin/fsck_ffs/pass5.c 1.123.2.4 +68 -1 src/sys/ufs/ffs/ffs_alloc.c 1.156.2.2 +12 -3 src/sys/ufs/ffs/ffs_softdep.c 1.43.2.3 +6 -1 src/sys/ufs/ffs/fs.h