JFFS2 corruption

Florian Schirmer jolt at tuxbox.org
Thu Feb 5 08:15:03 EST 2004


Hi,

i'm having a strange problem with a JFFS2 filesystem: I always get messages
about incorrect CRC values while mounting the filesystem. What i did:

<create a file which contains nothing but lots of 0x42 called dummy.bin>

eraseall -j /dev/mtdblock/3
mount -t jffs2 /dev/mtdblock /mnt
cp /dummy.bin /mnt/dummy1.bin
cp /dummy.bin /mnt/dummy2.bin
cp /dummy.bin /mnt/dummy3.bin
cp /dummy.bin /mnt/dummy4.bin
sync
cat /dev/mtdblock/3 > /dump1.raw
umount /mnt
cat /dev/mtdblock/3 > /dump2.raw
mount -t jffs2 /dev/mtdblock /mnt

<Multiple messages about invalid JFFS2 CRC values>

cat /dev/mtdblock/3 > /dump3.raw

cmp -l /dump1.raw /dump2.raw => files are the same
cmp -l /dump2.raw /dump3.raw => Multiple differences.

Did some addition tests:

umount /mnt
cat /dev/mtdblock/3 > /dump2.raw
mount -t jffs2 /dev/mtdblock /mnt

Mounts just fine. But there are huge chunks of 0x00 in my dummy files on the
jffs2 partition.

Any ideas on how to track down this problem? Basic MTD/flash stuff seems to
work just fine. I can work with a cramfs image on this partition without any
errors. So i assume something is going wrong in the JFFS2 code.

Specs:

Build Host: x86
Target: MIPS (LE)
Flash: NOR (AMD)
MTD/JFFS2 Codebase: current CVS

Thanks,
   Florian




More information about the linux-mtd mailing list