jffs2 with sync burst mode
Konstantin Kletschke
lists at ku-gbr.de
Thu Mar 10 13:27:25 EST 2005
Am 2005-03-10 17:17 +0000 schrieb Artem B. Bityuckiy:
> Well, then I offer to start debugging. Insert printk() calls and start
> catching error step by step.
Mine or jffs2's or mtd's error...
printk("totlen: %x\nnsize: %x\n", rd->totlen,rd->nsize);
before
rc = crc32(0, rd, sizeof(*rd)-8);
and
printk("rd->nsize before memcpy: %x\n", rd->nsize);
printk("address of rd->name: %x\n", rd->name[0]);
memcpy(&fd->name, rd->name, rd->nsize);
printk("rd->nsize after memcpy: %x\n", rd->nsize);
fd->name[rd->nsize] = 0;
printk("fd->name: %s\n", fd->name);
totlen: 3e
nsize: 16
rd->nsize before memcpy: 16
address of rd->name: 6f
rd->nsize after memcpy: 16
fd->name: openssh-host-key
jffs2_scan_dirent_node(): Name CRC failed on node at 0x003a52c8: Read 0x839452cb, calculated 0x262752af
Name for which CRC failed is (now) 'openssh-host-key', ino #350
totlen: 3c
nsize: 14
rd->nsize before memcpy: 14
address of rd->name: 6c
rd->nsize after memcpy: 14
fd->name: linux-wlan-nÒ
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0047aa4c: Read 0xb9570647, calculated 0x6ac2e146
Name for which CRC failed is (now) 'linux-wlan-nÒ', ino #210
This is cat "/dev/mtdblock3 > file" afterwards:
003a52c0: 0000 0000 ff45 79b6 8519 01e0 3e00 0000 .....Ey.....>...
003a52d0: 4bc9 e11a 4901 0000 1600 0000 5e01 0000 K...I.......^...
003a52e0: 9900 0000 1608 0000 333a 7af0 cb52 9483 ........3:z..R..
003a52f0: 6f70 656e 7373 682d 686f 7374 2d6b 6579 openssh-host-key
003a5300: 6765 6e2e 7368 ffff 8519 02c0 2801 0000 gen.sh......(...
003a5310: 91d9 c5e8 5e01 0000 0200 0000 ed81 0000 ....^...........
003a5320: 0000 0000 9902 0000 9900 0000 9900 0000 ................
0047aa40: 0000 0000 0000 0000 3d99 4484 8519 01e0 ........=.D.....
0047aa50: 3c00 0000 c001 e8b0 d100 0000 0200 0000 <...............
0047aa60: d200 0000 9100 0000 1408 0000 56db cdde ............V...
0047aa70: 4706 57b9 6c69 6e75 782d 776c 616e 2d6e G.W.linux-wlan-n
0047aa80: 672d 7072 652d 7570 8519 02c0 8006 0000 g-pre-up........
0047aa90: fefe 5565 d200 0000 0200 0000 ed81 0000 ..Ue............
0047aaa0: 0000 0000 0010 0000 9100 0000 9100 0000 ................
So it could be rd->name contains garbage, "d2" in second case and
memcopy is terminated by "00". May be...
> All JFFS2 read/write goes through mtd->write(), mtd->writev(),
> mtd->read(). You might just find the corresponded handlers and insert
> printk's there. This will give us additional information.
Ok, I will try this tomorrow, I have to leave know, sadly as debugging
gets interesting :)
Kind Regards and thanks for your help, Konsti
--
GPG KeyID EF62FCEF
Fingerprint: 13C9 B16B 9844 EC15 CC2E A080 1E69 3FDA EF62 FCEF
More information about the linux-mtd
mailing list