Skip to contentSkip to conversation

Reiser4 on PowerPC, oops and more

DISCUSSION Carl Henrik Lunde 3 participants 4 messages Oct 10, 2004 – Oct 25, 2004

lore
Share & tools
lore
#0 lore raw

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):

First I tried mounting a partition formatted with mkfs.reiserfs4 on the PowerPC machine (2.6.9-rc3-mm-3):

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.

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).

Signature · 1 line
Carl Henrik Lunde
#1 lore raw

Hello

Quoted 2 lines · Carl Henrik Lunde

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

Quoted 4 lines

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?

Quoted 83 lines

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
Quoted 3 lines

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?

Quoted 30 lines

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
Quoted 7 lines

(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).

===== plugin/alloc/alloc40/alloc40.c 1.176 vs edited =====

plugin/alloc/alloc40/alloc40.c +2 -1
@@ -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))) {
#2 lore raw
Quoted 7 lines · Vladimir Saveliev

Would you please send us what do

debugfs.reiser4
and
debugfs.reiser4 -t

output?

(This is from 1.0.2, made with mkfs.reiser4 -f -o key=key_short (I forgot to enable long keys in the kernel)):

pitr ~ > /usr/local/sbin/debugfs.reiser4 img-from-ia32 /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Master super block (16):

magic:          ReIsEr4
blksize:        4096
format:         0x0 (format40)
uuid:           149457d7-c308-48e3-8dda-a6c9b3000000
label:          <none>

Format super block (17):

plugin:         format40
description:    Disk-format for reiser4. 
magic:          ReIsEr40FoRmAt
flushes:        0
mkfs id:        0x484b7b0a
blocks:         32
free blocks:    7
root block:     23
tail policy:    0x2 (smart)
next oid:       0x10000
file count:     0
tree height:    2
key policy:     SHORT

FS status block (21):
FS marked consistent

pitr ~ > /usr/local/sbin/debugfs.reiser4 -t img-from-ia32 /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

NODE (23) LEVEL=2 ITEMS=1 SPACE=4030 MKFS ID=0x484b7b0a FLUSH=0x0 #0 NPTR (nodeptr40): [29:1(SD):2a:0] OFF=28, LEN=8, flags=0x0
[24]
==============================================================================
NODE (24) LEVEL=1 ITEMS=2 SPACE=3856 MKFS ID=0x484b7b0a FLUSH=0x0 #0 SD (stat40): [29:1(SD):2a:0] OFF=28, LEN=82, flags=0x0

exts:           0
mask:           0x0

------------------------------------------------------------------------------
#1 DIRITEM (cde40): [2a:0(NAME):0:0] OFF=110, LEN=70, flags=0x0
NR NAME OFFSET HASH SDKEY
0 . 38 0000000000000000:0000000000000000 0000291:000002a
1 .. 54 002e2e0000000000:0000000000000000 0000291:000002a
==============================================================================

pitr ~ > /usr/local/sbin/debugfs.reiser4 img-made-locally /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Master super block (16):

magic:          ReIsEr4
blksize:        4096
format:         0x0 (format40)
uuid:           7bca4399-bef6-460e-a580-2b4ebbfdf3dd
label:          <none>

Format super block (17):

plugin:         format40
description:    Disk-format for reiser4. 
magic:          ReIsEr40FoRmAt
flushes:        0
mkfs id:        0x78cd07fa
blocks:         32
free blocks:    7
root block:     23
tail policy:    0x2 (smart)
next oid:       0x10000
file count:     0
tree height:    2
key policy:     SHORT

FS status block (21):
FS marked consistent

pitr ~ > /usr/local/sbin/debugfs.reiser4 -t img-made-locally /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

NODE (23) LEVEL=2 ITEMS=1 SPACE=4030 MKFS ID=0x78cd07fa FLUSH=0x0 #0 NPTR (nodeptr40): [29:1(SD):2a:0] OFF=28, LEN=8, flags=0x0
[24]
==============================================================================
NODE (24) LEVEL=1 ITEMS=2 SPACE=3856 MKFS ID=0x78cd07fa FLUSH=0x0 #0 SD (stat40): [29:1(SD):2a:0] OFF=28, LEN=82, flags=0x0

exts:           3
mask:           0x0
plugin:         sdext_lw
offset:         2
len:            14
mode:           drwxr-xr-x
nlink:          3
size:           2
plugin:         sdext_unix
offset:         16
len:            28
uid:            1000
gid:            1000
atime:          Sun Oct 24 22:30:16 2004
mtime:          Sun Oct 24 22:30:16 2004
ctime:          Sun Oct 24 22:30:16 2004
rdev:           68
bytes:          68
plugin:         sdext_plug
offset:         44
len:            38
Pset count:     9

permission : id = 0
formatting : id = 2 (smart)
hash : id = 1 (r5_hash)
fibration : id = 2 (ext_1_fibre)
statdata : id = 0 (stat40)
diritem : id = 2 (cde40)
crypto : id = 0
digest : id = 0
compress : id = 0
------------------------------------------------------------------------------
#1 DIRITEM (cde40): [2a:0(NAME):0:0] OFF=110, LEN=70, flags=0x0
NR NAME OFFSET HASH
SDKEY
0 . 38 0000000000000000:00000000000000
00 0000291:000002a
1 .. 54 002e2e0000000000:00000000000000
00 0000291:000002a
==============================================================================

Quoted 3 lines

Would you please try to patch reiser4progs's plugin/alloc/alloc40/alloc40.c with the attached patch and try again?

This patch only fixes the alloc block, which (I believe) is not *yet* a problem, there are more bugs which has to be solved first.

Anyway, today I compiled 2.6.9-mm1 and got a new backtrace (I get the same trace with both the image made on PPC and IA32 now (except for some registers)):

pitr ~ > sudo mount -t reiser4 -o loop ~/img-from-ia32 /mnt reiser4[mount(1943)]: key_warning (fs/reiser4/plugin/object.c:97)[nikita-717]:
WARNING: Error for inode 720575940379279360 (-2) reiser4[mount(1943)]: commit_current_atom (fs/reiser4/txnmgr.c:1249)[zam-597]:
kernel BUG in reiser4_do_panic at fs/reiser4/debug.c:131!

Oops: Exception in kernel mode, sig: 5 [#2]
NIP: C009E25C LR: C00AEDD4 SP: CAB9BB30 REGS: cab9ba80 TRAP: 0700    Not tainted

MSR: 00029032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = d1fb40b0[1943] 'mount' THREAD: cab9a000Last syscall: 120
GPR00: C00AEDD4 CAB9BB30 D1FB40B0 C027152C FFFFFFE4 00000000 00017FC6 C035FF68
GPR08: C036031C C03123C8 D7637E7C CAB9BB3C 00000001 1002AE6C 100C0000 100A0000
GPR16: 00000000 101F0448 00000000 00000000 7FFFF9D6 00000000 10020000 00000000
GPR24: 7FFFF9E8 C02AE52C CAB9BD30 CF1EE000 CAB9BC28 CAB9BC20 C0370000 C0350000 NIP [c009e25c] reiser4_do_panic+0x2c/0xc4
LR [c00aedd4] force_commit_atom_nolock+0x0/0x40

Call trace:
 [c00aedd4] force_commit_atom_nolock+0x0/0x40
 [c00af5c0] try_commit_txnh+0x190/0x208
 [c00af67c] commit_txnh+0x44/0xbc
 [c00ae4cc] txn_end+0x68/0x70
 [c00ae4ec] txn_restart+0x18/0x34
 [c00aee00] force_commit_atom_nolock+0x2c/0x40
 [c00aef38] txnmgr_force_commit_all+0xc8/0xdc
 [c010736c] release_format40+0xd4/0x138
 [c00cca30] _done_disk_format+0x20/0x30
 [c00ccd98] done_super+0x48/0x64
 [c00cce3c] reiser4_fill_super+0x88/0x90
 [c0069a8c] get_sb_bdev+0x150/0x1cc
 [c00c53fc] reiser4_get_sb+0x18/0x28
 [c0069d90] do_kern_mount+0x64/0x128
 [c00814cc] do_new_mount+0x94/0xc4
Signature · 1 line
Carl Henrik Lunde
#3 lore raw

Hi Carl,

would you try this patch for the reiser4progs, it swaps Stat Data extention mask and SD extentions should be reachable now.

Signature · 2 lines
Thanks,
Vitaly Fertman
Quoted 186 lines · Carl Henrik Lunde
Quoted 7 lines · Vladimir Saveliev

Would you please send us what do

debugfs.reiser4
and
debugfs.reiser4 -t

output?

(This is from 1.0.2, made with mkfs.reiser4 -f -o key=key_short (I forgot to enable long keys in the kernel)):

pitr ~ > /usr/local/sbin/debugfs.reiser4 img-from-ia32 /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Master super block (16):

magic:          ReIsEr4
blksize:        4096
format:         0x0 (format40)
uuid:           149457d7-c308-48e3-8dda-a6c9b3000000
label:          <none>

Format super block (17):

plugin:         format40
description:    Disk-format for reiser4.
magic:          ReIsEr40FoRmAt
flushes:        0
mkfs id:        0x484b7b0a
blocks:         32
free blocks:    7
root block:     23
tail policy:    0x2 (smart)
next oid:       0x10000
file count:     0
tree height:    2
key policy:     SHORT

FS status block (21):
FS marked consistent

pitr ~ > /usr/local/sbin/debugfs.reiser4 -t img-from-ia32 /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

NODE (23) LEVEL=2 ITEMS=1 SPACE=4030 MKFS ID=0x484b7b0a FLUSH=0x0 #0 NPTR (nodeptr40): [29:1(SD):2a:0] OFF=28, LEN=8, flags=0x0
[24]
===========================================================================
=== NODE (24) LEVEL=1 ITEMS=2 SPACE=3856 MKFS ID=0x484b7b0a FLUSH=0x0 #0 SD (stat40): [29:1(SD):2a:0] OFF=28, LEN=82, flags=0x0

exts:           0
mask:           0x0

---------------------------------------------------------------------------
--- #1 DIRITEM (cde40): [2a:0(NAME):0:0] OFF=110, LEN=70, flags=0x0
NR NAME OFFSET HASH
SDKEY 0 . 38
0000000000000000:0000000000000000 0000291:000002a 1 ..

                  54 002e2e0000000000:0000000000000000 0000291:000002a

===========================================================================
===

pitr ~ > /usr/local/sbin/debugfs.reiser4 img-made-locally /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

Master super block (16):

magic:          ReIsEr4
blksize:        4096
format:         0x0 (format40)
uuid:           7bca4399-bef6-460e-a580-2b4ebbfdf3dd
label:          <none>

Format super block (17):

plugin:         format40
description:    Disk-format for reiser4.
magic:          ReIsEr40FoRmAt
flushes:        0
mkfs id:        0x78cd07fa
blocks:         32
free blocks:    7
root block:     23
tail policy:    0x2 (smart)
next oid:       0x10000
file count:     0
tree height:    2
key policy:     SHORT

FS status block (21):
FS marked consistent

pitr ~ > /usr/local/sbin/debugfs.reiser4 -t img-made-locally /usr/local/sbin/debugfs.reiser4 1.0.2
Copyright (C) 2001, 2002, 2003, 2004 by Hans Reiser, licensing governed by reiser4progs/COPYING.

NODE (23) LEVEL=2 ITEMS=1 SPACE=4030 MKFS ID=0x78cd07fa FLUSH=0x0 #0 NPTR (nodeptr40): [29:1(SD):2a:0] OFF=28, LEN=8, flags=0x0
[24]
===========================================================================
=== NODE (24) LEVEL=1 ITEMS=2 SPACE=3856 MKFS ID=0x78cd07fa FLUSH=0x0 #0 SD (stat40): [29:1(SD):2a:0] OFF=28, LEN=82, flags=0x0

exts:           3
mask:           0x0
plugin:         sdext_lw
offset:         2
len:            14
mode:           drwxr-xr-x
nlink:          3
size:           2
plugin:         sdext_unix
offset:         16
len:            28
uid:            1000
gid:            1000
atime:          Sun Oct 24 22:30:16 2004
mtime:          Sun Oct 24 22:30:16 2004
ctime:          Sun Oct 24 22:30:16 2004
rdev:           68
bytes:          68
plugin:         sdext_plug
offset:         44
len:            38
Pset count:     9

permission : id = 0
formatting : id = 2 (smart)
hash : id = 1 (r5_hash)
fibration : id = 2 (ext_1_fibre)
statdata : id = 0 (stat40)
diritem : id = 2 (cde40)
crypto : id = 0
digest : id = 0
compress : id = 0
---------------------------------------------------------------------------
--- #1 DIRITEM (cde40): [2a:0(NAME):0:0] OFF=110, LEN=70, flags=0x0
NR NAME OFFSET HASH
SDKEY
0 . 38
0000000000000000:00000000000000 00 0000291:000002a
1 .. 54
002e2e0000000000:00000000000000 00 0000291:000002a
===========================================================================
===

Quoted 2 lines

Would you please try to patch reiser4progs's plugin/alloc/alloc40/alloc40.c with the attached patch and try again?

This patch only fixes the alloc block, which (I believe) is not *yet* a problem, there are more bugs which has to be solved first.

Anyway, today I compiled 2.6.9-mm1 and got a new backtrace (I get the same trace with both the image made on PPC and IA32 now (except for some registers)):

pitr ~ > sudo mount -t reiser4 -o loop ~/img-from-ia32 /mnt reiser4[mount(1943)]: key_warning (fs/reiser4/plugin/object.c:97)[nikita-717]: WARNING: Error for inode 720575940379279360 (-2)
reiser4[mount(1943)]: commit_current_atom (fs/reiser4/txnmgr.c:1249)[zam-597]: kernel BUG in reiser4_do_panic at fs/reiser4/debug.c:131!

Oops: Exception in kernel mode, sig: 5 [#2]
NIP: C009E25C LR: C00AEDD4 SP: CAB9BB30 REGS: cab9ba80 TRAP: 0700    Not

tainted MSR: 00029032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 TASK = d1fb40b0[1943] 'mount' THREAD: cab9a000Last syscall: 120
GPR00: C00AEDD4 CAB9BB30 D1FB40B0 C027152C FFFFFFE4 00000000 00017FC6 C035FF68 GPR08: C036031C C03123C8 D7637E7C CAB9BB3C 00000001 1002AE6C 100C0000 100A0000 GPR16: 00000000 101F0448 00000000 00000000 7FFFF9D6 00000000 10020000 00000000 GPR24: 7FFFF9E8 C02AE52C CAB9BD30 CF1EE000 CAB9BC28 CAB9BC20 C0370000 C0350000 NIP [c009e25c]

reiser4_do_panic+0x2c/0xc4
LR [c00aedd4] force_commit_atom_nolock+0x0/0x40
Call trace:
 [c00aedd4] force_commit_atom_nolock+0x0/0x40
 [c00af5c0] try_commit_txnh+0x190/0x208
 [c00af67c] commit_txnh+0x44/0xbc
 [c00ae4cc] txn_end+0x68/0x70
 [c00ae4ec] txn_restart+0x18/0x34
 [c00aee00] force_commit_atom_nolock+0x2c/0x40
 [c00aef38] txnmgr_force_commit_all+0xc8/0xdc
Quoted 8 lines
 [c010736c] release_format40+0xd4/0x138
 [c00cca30] _done_disk_format+0x20/0x30
 [c00ccd98] done_super+0x48/0x64
 [c00cce3c] reiser4_fill_super+0x88/0x90
 [c0069a8c] get_sb_bdev+0x150/0x1cc
 [c00c53fc] reiser4_get_sb+0x18/0x28
 [c0069d90] do_kern_mount+0x64/0x128
 [c00814cc] do_new_mount+0x94/0xc4

===== plugin/item/stat40/stat40.c 1.272 vs edited =====

plugin/item/stat40/stat40.c +6 -6
@@ -42,7 +42,7 @@
 				}
 			}
 			
-			extmask = *((uint16_t *)stat_body(&stat));
+			extmask = st40_get_extmask(stat_body(&stat));
 			
 			stat.ext_plug = NULL;
 			
@@ -314,7 +314,7 @@
 
 	/* If this is a new item being inserted, zero the on-disk mask. */
 	if (place->pos.unit == MAX_UINT32 && insert)
-		((stat40_t *)stat_body(&stat))->extmask = 0;
+		st40_set_extmask(stat_body(&stat), 0);
 
 	if (!stath->extmask)
 		return 0;
@@ -339,7 +339,7 @@
 				}
 			}
 			
-			extmask = *((uint16_t *)stat_body(&stat));
+			extmask = st40_get_extmask(stat_body(&stat));
 
 			if (insert) {
 				/* Calculating new extmask in order to 
@@ -348,7 +348,7 @@
 					     0x000000000000ffff));
 
 				/* Update mask.*/
-				*((uint16_t *)stat_body(&stat)) = extmask;
+				st40_set_extmask(stat_body(&stat), extmask);
 			}
 			
 			stat.offset += sizeof(d16_t);
@@ -449,7 +449,7 @@
 				}
 			}
 			
-			old_extmask = *((uint16_t *)stat_body(&stat));
+			old_extmask = st40_get_extmask(stat_body(&stat));
 
 			
 			/* Calculating new extmask in order to update old
@@ -458,7 +458,7 @@
 						       0x000000000000ffff));
 
 			/* Update mask.*/
-			*((uint16_t *)stat_body(&stat)) = new_extmask;
+			st40_set_extmask(stat_body(&stat), new_extmask);
 				
 			chunks++;
 			stat.offset += sizeof(d16_t);

===== plugin/item/stat40/stat40.h 1.49 vs edited =====

plugin/item/stat40/stat40.h +2 -2
@@ -29,7 +29,7 @@
 
 #define STAT40_EXTNR (64)
 
-#define st40_get_extmask(stat)		aal_get_le16(stat, extmask)
-#define st40_set_extmask(stat, val)	aal_set_le16(stat, extmask, val)
+#define st40_get_extmask(stat)		aal_get_le16(((stat40_t *)stat), extmask)
+#define st40_set_extmask(stat, val)	aal_set_le16(((stat40_t *)stat), extmask, val)
 
 #endif

===== plugin/item/stat40/stat40_repair.c 1.64 vs edited =====

plugin/item/stat40/stat40_repair.c +1 -1
@@ -65,7 +65,7 @@
 		return 0;
 
 	/* This time the callback is called for the extmask. Fix it. */
-	*((uint16_t *)stat_body(stat)) = *(uint16_t *)mask;
+	st40_set_extmask(stat_body(stat), *(uint16_t *)mask);
 
 	(*mask) >>= 16;
 	return 0;