From owner-svn-src-head@FreeBSD.ORG Fri Apr 30 04:21:22 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCF58106566C; Fri, 30 Apr 2010 04:21:22 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BDDBD8FC12; Fri, 30 Apr 2010 04:21:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3U4LMf0056222; Fri, 30 Apr 2010 04:21:22 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3U4LMmV056220; Fri, 30 Apr 2010 04:21:22 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201004300421.o3U4LMmV056220@svn.freebsd.org> From: Jeff Roberson Date: Fri, 30 Apr 2010 04:21:22 +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: r207421 - head/sbin/tunefs 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: Fri, 30 Apr 2010 04:21:22 -0000 Author: jeff Date: Fri Apr 30 04:21:22 2010 New Revision: 207421 URL: http://svn.freebsd.org/changeset/base/207421 Log: - Use the path to the filesystem mountpoint to look up the statfs structure so that we correctly reload. Note that tunefs doesn't properly detect the need to reload if the disk device is specified for a read-only mounted filesystem. - Lessen the contiguity requirement for the journal so that it is more likely to succeed. Modified: head/sbin/tunefs/tunefs.c Modified: head/sbin/tunefs/tunefs.c ============================================================================== --- head/sbin/tunefs/tunefs.c Fri Apr 30 03:35:05 2010 (r207420) +++ head/sbin/tunefs/tunefs.c Fri Apr 30 04:21:22 2010 (r207421) @@ -280,9 +280,9 @@ main(int argc, char *argv[]) if (ufs_disk_fillout(&disk, special) == -1) goto err; if (disk.d_name != special) { - special = disk.d_name; - if (statfs(special, &stfs) == 0 && - strcmp(special, stfs.f_mntonname) == 0) + if (statfs(special, &stfs) != 0) + warn("Can't stat %s", special); + if (strcmp(special, stfs.f_mntonname) == 0) active = 1; } @@ -546,7 +546,7 @@ journal_balloc(void) * Try to minimize fragmentation by requiring a minimum * number of blocks present. */ - if (cgp->cg_cs.cs_nbfree > blocks / 8) + if (cgp->cg_cs.cs_nbfree > 128 * 1024 * 1024) break; if (contig == 0 && cgp->cg_cs.cs_nbfree) break;