From owner-cvs-src@FreeBSD.ORG Sun Jul 3 01:26:27 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3A2316B208; Sun, 3 Jul 2005 01:01:20 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 126E5451E5; Sun, 3 Jul 2005 00:49:53 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 462A96E981; Sat, 2 Jul 2005 17:40:29 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id F3D2B5C9CA for ; Sun, 20 Feb 2005 00:02:26 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A4E4F56C0D for ; Sun, 20 Feb 2005 08:02:26 +0000 (GMT) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id DE5F416A53C; Sun, 20 Feb 2005 08:02:21 +0000 (GMT) Delivered-To: ps@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 8852F16A4D0; Sun, 20 Feb 2005 08:02:20 +0000 (GMT) Delivered-To: src-committers@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 To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on elvis.mu.org X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00, SARE_SUB_GAPPY_3 autolearn=no version=3.0.2 X-Spam-Level: Cc: 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-src@freebsd.org X-Mailman-Version: 2.1.5 List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 01:26:27 -0000 X-Original-Date: Sun, 20 Feb 2005 08:02:16 +0000 (UTC) X-List-Received-Date: Sun, 03 Jul 2005 01:26:27 -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