From owner-freebsd-current@FreeBSD.ORG Tue Apr 27 05:55:05 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F5501065673 for ; Tue, 27 Apr 2010 05:55:05 +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 7AA928FC14 for ; Tue, 27 Apr 2010 05:55:05 +0000 (UTC) Received: by pvc21 with SMTP id 21so808392pvc.13 for ; Mon, 26 Apr 2010 22:55:02 -0700 (PDT) Received: by 10.140.82.42 with SMTP id f42mr5091414rvb.146.1272347702437; Mon, 26 Apr 2010 22:55:02 -0700 (PDT) Received: from [10.0.1.198] (udp022762uds.hawaiiantel.net [72.234.79.107]) by mx.google.com with ESMTPS id 20sm3725889iwn.1.2010.04.26.22.55.00 (version=SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 22:55:01 -0700 (PDT) Date: Mon, 26 Apr 2010 19:55:02 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Lucius Windschuh In-Reply-To: Message-ID: References: <4BD35437.2060208@lissyara.su> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org Subject: Re: HEADS UP: SUJ Going in to head today 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, 27 Apr 2010 05:55:05 -0000 On Sun, 25 Apr 2010, Lucius Windschuh wrote: > Hi Jeff, > thank you for your effort in implementing the soft update journaling. > I tried to test SUJ on a provider with 4 kB block size. My system runs > 9-CURRENT r207195 (i386). > Unfortunately, tunefs is unable to cope with the device. It can easily > reproduced with these steps: > > # mdconfig -s 128M -S 4096 > 0 > # newfs -U /dev/md0 Thanks for the repro. This is an interesting case. I'll have to slightly rewrite the directory handling code in tunefs but it should not take long. Thanks, Jeff > /dev/md0: 128.0MB (262144 sectors) block size 16384, fragment size 4096 > using 4 cylinder groups of 32.02MB, 2049 blks, 2112 inodes. > with soft updates > # tunefs -j enable /dev/md0 > Using inode 4 in cg 0 for 4194304 byte journal > tunefs: Failed to read dir block: Invalid argument > tunefs: soft updates journaling can not be enabled > > The bread() in tunefs.c:701 fails as the requested block size (512) is > smaller than the provider's block size (4096 bytes). > > As a simply attempt to fix it, I changed tunefs.c:760 to " if > (dir_extend(blk, nblk, size, ino) == -1)", as I thought that this made > more sense. Then, tunefs succeeded, but mounting the file system > resulted in a panic: > panic: ufs_dirbad: /mnt/md-test: bad dir ino 2 at offset 512: mangled entry > > db:0:kdb.enter.default> bt > Tracing pid 2714 tid 100262 td 0xc7ea6480 > kdb_enter(c0a21226,c0a21226,c0a49886,eb1e6714,0,...) at kdb_enter+0x3a > panic(c0a49886,c688f468,2,200,c0a498df,...) at panic+0x136 > ufs_dirbad(c81bb000,200,c0a498df,0,eb1e67b0,...) at ufs_dirbad+0x46 > ufs_lookup_ino(c81d5990,0,eb1e67d8,eb1e6800,0,...) at ufs_lookup_ino+0x367 > softdep_journal_lookup(c688f288,eb1e68c4,c0a45eca,750,eb1e6834,...) at > softdep_journal_lookup+0xb0 > softdep_mount(c7e3fbb0,c688f288,c8165000,c7bdf900,c7bdf900,...) at > softdep_mount+0xdb > ffs_mount(c688f288,0,c0a2df89,3d6,0,...) at ffs_mount+0x23e1 > vfs_donmount(c7ea6480,0,c7bc6100,c7bc6100,c8031000,...) at vfs_donmount+0x1000 > nmount(c7ea6480,eb1e6cf8,c,c,207,...) at nmount+0x64 > syscall(eb1e6d38) at syscall+0x1da > Xint0x80_syscall() at Xint0x80_syscall+0x20 > --- syscall (378, FreeBSD ELF32, nmount), eip = 0x280f205b, esp = > 0xbfbfdcec, ebp = 0xbfbfe248 --- > > ... so this attempt did not succeed, but was worth a try ;-) > > But it would be nice to use SUJ even on such a unusual configuration. > > Lucius >