From: Vladimir Saveliev Subject: Re: Reiser4 on PowerPC, oops and more Date: Mon, 11 Oct 2004 19:39:23 +0400 Message-ID: <1097509160.4803.149.camel@tribesman.namesys.com> References: <87acuufed6.wl@pitr.ping.uio.no> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-XdppzSnawg8H9HPL8XsE" Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com In-Reply-To: <87acuufed6.wl@pitr.ping.uio.no> List-Id: To: Carl Henrik Lunde Cc: reiserfs-list@namesys.com --=-XdppzSnawg8H9HPL8XsE Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello On Mon, 2004-10-11 at 01:32, Carl Henrik Lunde wrote: > Hi, I know it's not supposed to work (yet), but I thought you might be > interrested in these logs (from a 32 bit PPC machine): yes, thanks > > First I tried mounting a partition formatted with mkfs.reiserfs4 on the > PowerPC machine (2.6.9-rc3-mm-3): > Would you please send us what do debugfs.reiser4 and debugfs.reiser4 -t output? Would you try to mount file made by mkfs.reiser4 on i386? > ef_hash_table: 8192 buckets > z_hash_table: 8192 buckets > z_hash_table: 8192 buckets > j_hash_table: 16384 buckets > loading reiser4 bitmap......done (771 jiffies) > d_cursor_hash_table: 256 buckets > reiser4[mount(823)]: key_warning (fs/reiser4/plugin/object.c:97)[nikita-717]: > code: -2 at fs/reiser4/tree_walk.c:193 > WARNING: Error for inode 720575940379279360 (-2) > for key: (910200000000000:0:0:2:a00000000000000:0)[*] > inode: ino: 0, count: 1, link: 1, mode: 0, size: 0 > uid: 0, gid: 0, dev: 3145733, rdev: 0 > atime: [0,0], mtime: [0,0], ctime: [0,0] > blkbits: 12, blksize: 0, blocks: 0, bytes: 0 > version: 0, generation: 0, state: 72, flags: 0 > is_reiser4_inode: 1 > key: (910200000000000:1:ffffffffffffffff:0:a00000000000000:0)[stat data] > file: (nil) > dir: (nil) > perm: (nil) > formatting: (nil) > hash: (nil) > sd: (nil) > sd_seal: version: 0, block: 0 > seal key: (0:0:0:0:0:0)[] > seal coord: item_pos = 0, unit_pos 0, tween=before unit, iplug=0 > sd_coord: item_pos = 0, unit_pos 0, tween=invalid, iplug=255 > flags: 0x0, extmask: 0x0, pmask: 0, locality: 653057130340810752 > > > > Then I tried mounting a file made with mkfs.reiser4/IA32 on the > PowerPC machine: > > $ sudo mount -o loop reiser4-from-ia32 /mnt > > Message from syslogd@pitr at Sun Oct 10 21:25:03 2004 ... > pitr kernel: reiser4 panicked cowardly: assertion failed: atomic_read(&node->d_count) > 0 > > loop: loaded (max 8 devices) > ef_hash_table: 8192 buckets > z_hash_table: 8192 buckets > z_hash_table: 8192 buckets > j_hash_table: 16384 buckets > loading reiser4 bitmap...<4>reiser4[mount(1083)]: check_struct_bnode (fs/reiser4/plugin/space/bitmap.c:725)[vpf-1361]: > WARNING: Checksum for the bitmap block 18 is incorrect > reiser4[mount(1083)]: jrelse_tail (fs/reiser4/jnode.c:1023)[nikita-489]: > reiser4 panicked cowardly: assertion failed: atomic_read(&node->d_count) > 0 > pid: 1083, comm: mount > lock stack: > .... nr_signaled 0 > .... curpri high > .... current locks: > atom: no atom > kernel BUG in reiser4_do_panic at fs/reiser4/debug.c:131! > Oops: Exception in kernel mode, sig: 5 [#1] > NIP: C009E194 LR: C009DFE8 SP: D2879910 REGS: d2879860 TRAP: 0700 Not tainted > MSR: 00029032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 > TASK = d32103b0[1083] 'mount' THREAD: d2878000Last syscall: 120 > GPR00: C043A69C D2879910 D32103B0 00000000 00000001 FFFFFFFF C0440000 C0390000 > GPR08: C043A69C C043A69C C043A69C C043A69C 82002424 1002AE6C 100C0000 100A0000 > GPR16: 00000000 00000000 10010000 7FFFF718 C0340000 C0360000 C0320000 C0370000 > GPR24: D74A3010 C0910C00 D53C72E0 00000000 00000001 C0450000 4B1B5D0B D2879D00 > NIP [c009e194] reiser4_do_panic+0x28c/0x2a0 > LR [c009dfe8] reiser4_do_panic+0xe0/0x2a0 > Call trace: > [c00a2504] jrelse_tail+0xd8/0x1b0 > [c019d80c] release+0x18/0x1c0 > [c019da18] done_bnode+0x64/0x68 > [c01a0f88] destroy_allocator_bitmap+0xdc/0x2c8 > [c01a0dec] init_allocator_bitmap+0x1d4/0x294 > [c01a21a4] try_init_format40+0x380/0x4d0 > [c01a2310] get_ready_format40+0x1c/0x17c > [c0115958] _init_disk_format+0x2c/0x80 > [c0116044] reiser4_fill_super+0x54/0xdc > [c0069b78] get_sb_bdev+0x150/0x1cc > [c01075d4] reiser4_get_sb+0x18/0x28 > [c0069e7c] do_kern_mount+0x64/0x128 > [c008126c] do_new_mount+0x94/0xc4 > [c00819c8] do_mount+0x158/0x190 > [c0081e50] sys_mount+0xa4/0xf4 > > > So there are endian-related bugs both in the user space tools and > kernel driver. > Would you please try to patch reiser4progs's plugin/alloc/alloc40/alloc40.c with the attached patch and try again? > Here are the kernel messages from 2.6.8 + debian patches + > reiserfs4-patches from debian, when mounting an image made on IA32: > > reiser4[mount(26854)]: check_struct_bnode (fs/reiser4/plugin/space/bitmap.c:724)[vpf-1361]: > WARNING: Checksum for the bitmap block 18 is incorrect > Oops: kernel access of bad area, sig: 11 [#1] > NIP: C009B720 LR: C00A4F80 SP: CF157CA0 REGS: cf157bf0 TRAP: 0300 Not tainted > MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 > DAR: 00000000, DSISR: 40000000 > TASK = d4bef320[26854] 'mount' THREAD: cf156000Last syscall: 120 > GPR00: C00A4F80 CF157CA0 D4BEF320 00000000 C000B32C 00E00000 00000000 00049032 > GPR08: 00000000 00000000 00002000 00000001 0724EA46 1002AE6C 100C0000 100A0000 > GPR16: 00000000 100EF3C8 00000000 00000000 7FFFFAE9 00000000 10020000 00000000 > GPR24: 7FFFFAF1 C02728F0 CF157D30 C0935200 C7100818 C7100818 C7100840 C7100818 > NIP [c009b720] znodes_tree_done+0x3c/0x288 > LR [c00a4f80] done_tree+0x4c/0x78 > Call trace: > [c00a4f80] done_tree+0x4c/0x78 > [c00c2dd8] _done_formatted_fake+0x28/0x48 > [c00c31f8] done_super+0x48/0x64 > [c00c329c] reiser4_fill_super+0x88/0x90 > [c0066fc4] get_sb_bdev+0x150/0x1c0 > [c00bc4cc] reiser4_get_sb+0x18/0x28 > [c00672ac] do_kern_mount+0x64/0x128 > [c007deec] do_new_mount+0x94/0xc4 > [c007e618] do_mount+0x158/0x190 > [c007eaa0] sys_mount+0xa4/0xf4 > [c0007d30] ret_from_syscall+0x0/0x4c > > > (I tried reiser4progs 1.0.2 too. Note that the -mm3 kernel is > probably not stable on PowerPC, programs such as firefox crashed at > startup.) > > I also took a quick search for non-byteswapped 32 bit integers, and > found that at least the alloc block checksum is not byteswapped (when > creating an image on PPC). --=-XdppzSnawg8H9HPL8XsE Content-Disposition: attachment; filename=alloc40.c.diff Content-Type: text/plain; name=alloc40.c.diff; charset=koi8-r Content-Transfer-Encoding: 7bit ===== plugin/alloc/alloc40/alloc40.c 1.176 vs edited ===== --- 1.176/plugin/alloc/alloc40/alloc40.c 2004-09-22 23:10:50 +04:00 +++ edited/plugin/alloc/alloc40/alloc40.c 2004-10-11 19:34:53 +04:00 @@ -344,7 +344,8 @@ adler = aal_adler32(current, chunk); } - aal_memcpy(block.data, &adler, sizeof(adler)); + /*aal_memcpy(block.data, &adler, sizeof(adler));*/ + *((uint32_t *)block.data) = CPU_TO_LE32(adler); /* Saving block onto device it was allocated on */ if ((res = aal_block_write(&block))) { --=-XdppzSnawg8H9HPL8XsE--