From owner-freebsd-current@FreeBSD.ORG Tue May 25 23:17:42 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 A1C621065674 for ; Tue, 25 May 2010 23:17:42 +0000 (UTC) (envelope-from marcelorossi@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 5C64E8FC18 for ; Tue, 25 May 2010 23:17:42 +0000 (UTC) Received: by qyk11 with SMTP id 11so8512939qyk.13 for ; Tue, 25 May 2010 16:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ltQfpwRLrcXk03L+mI9ZBRx5P4wK47OdqeR/M5Xb0qE=; b=h0Rwzz3F51V0KawdJS5sHUacTQzxTgZP+gWZSMU+FS7ncRSzGRWp8u/MB+WrL+rngv rv1XxfVEM3FacRlOmtpZqTnOXohS/FWXKFJG8RZGfot63i+0YzYuk3ud+BKXDjCspKRg Rm0u5iyUNqHARifB2JrSp2dcqAa3C8x6hZN2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gL9dJtKReXMEL9+nxcM82vlGBoVyiwT8FfpLu1OweQWE9f7W59TwUPdlMWUNT35yk3 40CsEYox4Ut9O2Vpa3XKj0kdJe5DOoAo5wdcUTklsWk3IZJrsMbsmsSdHWsYfEGb1j17 eO2aA4TJUkPDq2/bddgiAi5avLtT67UvR4BrY= MIME-Version: 1.0 Received: by 10.229.187.135 with SMTP id cw7mr1698403qcb.15.1274827779868; Tue, 25 May 2010 15:49:39 -0700 (PDT) Received: by 10.229.80.6 with HTTP; Tue, 25 May 2010 15:49:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 May 2010 19:49:39 -0300 Message-ID: From: "Marcelo/Porks" To: Jeff Roberson Content-Type: text/plain; charset=ISO-8859-1 Cc: current@freebsd.org Subject: Re: 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, 25 May 2010 23:17:42 -0000 On 5/17/10, Jeff Roberson wrote: > I fixed the sparse inode tunefs bug and changed the tunefs behavior based > on discussions here on current@. Hopefully this works for everyone. Hi! I tested the r208241 and it's seems to be ok but this calls my atention to other thing: Could I disable de SU when the SUJ is enabled? I did some tests and seems that I can do this (logs bellow). But will SUJ work properly with SU disabled? Thanks. ========== logs ============ BARAD-DUR# uname -a FreeBSD BARAD-DUR.BUTECO 9.0-CURRENT FreeBSD 9.0-CURRENT #11 r208366: Thu May 20 21:52:36 BRT 2010 porks@BARAD-DUR.BUTECO:/usr/obj/usr/src/sys/BARAD-DUR i386 BARAD-DUR# df -h /dev/ad2s1d Filesystem Size Used Avail Capacity Mounted on /dev/ad2s1d 72G 54G 12G 82% BARAD-DUR# df -h | grep /dev/ad2s1d BARAD-DUR# tunefs -p /dev/ad2s1d tunefs: POSIX.1e ACLs: (-a) disabled tunefs: NFSv4 ACLs: (-N) disabled tunefs: MAC multilabel: (-l) disabled tunefs: soft updates: (-n) enabled tunefs: soft update journaling: (-j) disabled tunefs: gjournal: (-J) disabled tunefs: maximum blocks per file in a cylinder group: (-e) 2048 tunefs: average file size: (-f) 16384 tunefs: average number of files in a directory: (-s) 64 tunefs: minimum percentage of free space: (-m) 8% tunefs: optimization preference: (-o) time tunefs: volume label: (-L) BARAD-DUR# tunefs -j enable /dev/ad2s1d Using inode 13 in cg 0 for 33554432 byte journal tunefs: soft updates journaling set BARAD-DUR# tunefs -p /dev/ad2s1d tunefs: POSIX.1e ACLs: (-a) disabled tunefs: NFSv4 ACLs: (-N) disabled tunefs: MAC multilabel: (-l) disabled tunefs: soft updates: (-n) enabled tunefs: soft update journaling: (-j) enabled tunefs: gjournal: (-J) disabled tunefs: maximum blocks per file in a cylinder group: (-e) 2048 tunefs: average file size: (-f) 16384 tunefs: average number of files in a directory: (-s) 64 tunefs: minimum percentage of free space: (-m) 8% tunefs: optimization preference: (-o) time tunefs: volume label: (-L) BARAD-DUR# tunefs -n disable /dev/ad2s1d tunefs: soft updates cleared BARAD-DUR# tunefs -p /dev/ad2s1d tunefs: POSIX.1e ACLs: (-a) disabled tunefs: NFSv4 ACLs: (-N) disabled tunefs: MAC multilabel: (-l) disabled tunefs: soft updates: (-n) disabled tunefs: soft update journaling: (-j) enabled tunefs: gjournal: (-J) disabled tunefs: maximum blocks per file in a cylinder group: (-e) 2048 tunefs: average file size: (-f) 16384 tunefs: average number of files in a directory: (-s) 64 tunefs: minimum percentage of free space: (-m) 8% tunefs: optimization preference: (-o) time tunefs: volume label: (-L) BARAD-DUR# mount /dev/ad2s1d BARAD-DUR# df -h | grep /dev/ad2s1d /dev/ad2s1d 72G 54G 12G 82% /mnt/ad2s1d BARAD-DUR# ls -lah /mnt/ad2s1d/test.log ls: /mnt/ad2s1d/test.log: No such file or directory BARAD-DUR# echo "test data" >> /mnt/ad2s1d/test.log BARAD-DUR# ls -lah /mnt/ad2s1d/test.log -rw-r--r-- 1 root wheel 10B May 25 19:36 /mnt/ad2s1d/test.log BARAD-DUR# cat /mnt/ad2s1d/test.log test data BARAD-DUR# > 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) { > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- Marcelo Rossi "This e-mail is provided "AS IS" with no warranties, and confers no rights."