Date: Sun, 25 Apr 2010 23:31:05 +0200 From: Lucius Windschuh <lwindschuh@googlemail.com> To: Jeff Roberson <jroberson@jroberson.net> Cc: freebsd-current@freebsd.org Subject: Re: HEADS UP: SUJ Going in to head today Message-ID: <o2r90a5caac1004251431o547d2f77u6e511d3db97c2fbb@mail.gmail.com> In-Reply-To: <alpine.BSF.2.00.1004241656270.1398@desktop> References: <4BD35437.2060208@lissyara.su> <alpine.BSF.2.00.1004241656270.1398@desktop>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?o2r90a5caac1004251431o547d2f77u6e511d3db97c2fbb>