From owner-cvs-all@FreeBSD.ORG Sun Feb 20 08:02:16 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 5404216A4CE; Sun, 20 Feb 2005 08:02:16 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35A1F43D46; Sun, 20 Feb 2005 08:02:16 +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 j1K82GpN003471; Sun, 20 Feb 2005 08:02:16 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1K82G2M003470; Sun, 20 Feb 2005 08:02:16 GMT (envelope-from delphij) Message-Id: <200502200802.j1K82G2M003470@repoman.freebsd.org> From: Xin LI Date: Sun, 20 Feb 2005 08:02:16 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD 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: Sun, 20 Feb 2005 08:02:16 -0000 delphij 2005-02-20 08:02:16 UTC FreeBSD src repository Modified files: sbin/fsck_ffs fsck.h pass5.c sys/ufs/ffs ffs_alloc.c ffs_softdep.c fs.h 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 MFC After: 1 week 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