Skip to contentSkip to conversation

JFFS2 IO

DISCUSSION Eric Hammerle 2 participants 2 messages Mar 22, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I'm currently developing on a custom board running uClinux kernel 2.4.20-uc0 on an
ARM7TDMI. We use Intel J3 Strataflash and are using jffs2 as our fs. I've run into a
problem where after FTPing a binary file around 1.3 megs, upon reboot the fs outputs
a single warning such as:

jffs2_scan_inode_node(): Data CRC failed on node at 0x0060000c: Read 0x17a11a74,
calculated 0xedda2a7c

Unfortunately, the garbage collector never reclaims this node, so any subsequent reboot
will print out the same message. This wouldn't be a problem, but if I upload the file to the
board one or two more times I get many print outs similar to:

jffs2_scan_dirent_node(): Name CRC failed on node at 0x0052d8b4: Read 0xd7d56506
, calculated 0xe489d5cc
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0052d910: Read 0x3c262956
, calculated 0xc2dbebe9
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0052d940: Read 0x8b4199a0
, calculated 0x8c19c269
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0052d99c: Read 0x3640ef2e
, calculated 0x0b987af9

The board then boots into single user mode with most of the fs missing. The same
effect can be achieved from copying the file described above several times. I patched
my jffs2 and mtd to add the changes found in kernel version 2.4.21 and this improved
the situation for smaller files, but larger files suffer from this problem.

I've found that if I remove the file instead of moving it from the upload directory, I start
getting error messages similar to:

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a16190:
0x0044 in
stead

Should I try patching further or could this be related to alignment problems related to
some of the alignment troubles found in the ARM7TDMI's?

TIA

E. Hammerle

#1 lore raw
Quoted 4 lines · Eric Hammerle

uClinux kernel 2.4.20-uc0 on an ARM7TDMI.

jffs2_scan_inode_node(): Data CRC failed on node at 0x0060000c: Read 0x17a11a74, calculated 0xedda2a7c

You need working alignment fixups. Failing that you'll probably get away with putting get_unaligned() in the flash chip driver where it reads from the buffer to write to the chip. Or in fact with the current code just memcpy the name to an aligned location in jffs2_garbage_collect_dirent(); I've just fixed the case of an unaligned pointer coming in from commit_write() and I think that was the only other time it happened.

Signature · 1 line
dwmw2