From owner-freebsd-current@FreeBSD.ORG Sun Apr 25 21:31:11 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 E7EBD106566C for ; Sun, 25 Apr 2010 21:31:10 +0000 (UTC) (envelope-from lwindschuh@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7D2D98FC24 for ; Sun, 25 Apr 2010 21:31:10 +0000 (UTC) Received: by wye20 with SMTP id 20so3778180wye.13 for ; Sun, 25 Apr 2010 14:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=5jnGE8+Dmo+WXQRSwj/ApkmidgZ6asMZXRTdKt1i9B0=; b=cY96Mv4lR78wuZGDWHf5pv3Vf+Io2fEurV1Ng+UepQE6yHKR56kVgOSpNW79oAKNVL vRxUpBjsB3eUMSEbCXWwrnsd8Z0mq1Tu9Dm/GD23tdrcuiDHp21cjEEDEJjio+DzdjrD xCbpj5c7Ab2ADectMJJnsU3zVJ2+p0YEj1c4s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=BOd6LJt5cCZfIqU6q8R22VJSIdGvhYiINiVK9X5070DeNQke715cFouHkIfSnBnXWH D9fC8Lkn3leu0AXnygFPL67zAys+0dhiiNnl2nAAOUpuin8GZDW6Efbn8ek3kGew+1kT AO+KKCCJj+OG83TREBoLk5BNdGNv+pMPa7t6k= MIME-Version: 1.0 Received: by 10.216.184.132 with SMTP id s4mr3833345wem.122.1272231065626; Sun, 25 Apr 2010 14:31:05 -0700 (PDT) Received: by 10.216.154.207 with HTTP; Sun, 25 Apr 2010 14:31:05 -0700 (PDT) In-Reply-To: References: <4BD35437.2060208@lissyara.su> Date: Sun, 25 Apr 2010 23:31:05 +0200 Message-ID: From: Lucius Windschuh To: Jeff Roberson Content-Type: text/plain; charset=ISO-8859-1 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: Sun, 25 Apr 2010 21:31:11 -0000 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 /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