From owner-freebsd-current@FreeBSD.ORG Tue May 18 02:18:10 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90699106566B for ; Tue, 18 May 2010 02:18:10 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 62E818FC0A for ; Tue, 18 May 2010 02:18:10 +0000 (UTC) Received: by pvh11 with SMTP id 11so2804740pvh.13 for ; Mon, 17 May 2010 19:18:09 -0700 (PDT) Received: by 10.142.195.20 with SMTP id s20mr4277069wff.248.1274149089784; Mon, 17 May 2010 19:18:09 -0700 (PDT) Received: from [10.0.1.198] (udp022762uds.hawaiiantel.net [72.234.79.107]) by mx.google.com with ESMTPS id x35sm1865545wfh.18.2010.05.17.19.18.08 (version=SSLv3 cipher=RC4-MD5); Mon, 17 May 2010 19:18:09 -0700 (PDT) Date: Mon, 17 May 2010 16:18:06 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: current@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: SUJ Changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 02:18:10 -0000 I fixed the sparse inode tunefs bug and changed the tunefs behavior based on discussions here on current@. Hopefully this works for everyone. I have one bad perf bug and one journal overflow bug left to resolve. Please keeps the reports coming and thank you for your help. Thanks, Jeff ---------- Forwarded message ---------- Date: Tue, 18 May 2010 01:45:28 +0000 (UTC) From: Jeff Roberson To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208241 - head/sbin/tunefs Author: jeff Date: Tue May 18 01:45:28 2010 New Revision: 208241 URL: http://svn.freebsd.org/changeset/base/208241 Log: - Round up the journal size to the block size so we don't confuse fsck. Reported by: Mikolaj Golub - Only require 256k of blocks per-cg when trying to allocate contiguous journal blocks. The storage may not actually be contiguous but is at least within one cg. - When disabling SUJ leave SU enabled and report this to the user. It is expected that users will upgrade SU filesystems to SUJ and want a similar downgrade path. Modified: head/sbin/tunefs/tunefs.c Modified: head/sbin/tunefs/tunefs.c ============================================================================== --- head/sbin/tunefs/tunefs.c Tue May 18 00:46:15 2010 (r208240) +++ head/sbin/tunefs/tunefs.c Tue May 18 01:45:28 2010 (r208241) @@ -358,10 +358,12 @@ main(int argc, char *argv[]) warnx("%s remains unchanged as disabled", name); } else { journal_clear(); - sblock.fs_flags &= ~(FS_DOSOFTDEP | FS_SUJ); + sblock.fs_flags &= ~FS_SUJ; sblock.fs_sujfree = 0; - warnx("%s cleared, " - "remove .sujournal to reclaim space", name); + warnx("%s cleared but soft updates still set.", + name); + + warnx("remove .sujournal to reclaim space"); } } } @@ -546,7 +548,7 @@ journal_balloc(void) * Try to minimize fragmentation by requiring a minimum * number of blocks present. */ - if (cgp->cg_cs.cs_nbfree > 128 * 1024 * 1024) + if (cgp->cg_cs.cs_nbfree > 256 * 1024) break; if (contig == 0 && cgp->cg_cs.cs_nbfree) break; @@ -906,6 +908,8 @@ journal_alloc(int64_t size) if (size / sblock.fs_fsize > sblock.fs_fpg) size = sblock.fs_fpg * sblock.fs_fsize; size = MAX(SUJ_MIN, size); + /* fsck does not support fragments in journal files. */ + size = roundup(size, sblock.fs_bsize); } resid = blocks = size / sblock.fs_bsize; if (sblock.fs_cstotal.cs_nbfree < blocks) {