JFFS2: checking CRCs twice!?

Ferenc Havasi havasi at inf.u-szeged.hu
Wed Jan 12 04:28:30 EST 2005


Hi Steven,

> But then it looks to me that - shortly after boot - the GC thread doing 
> the same again (in background.c), which takes another 6 scondes and 
> slows down the application startup...

If I am right there are two kind of CRC: hdr_crc and node_crc. At 
mounting time only the hdr_crc is checked which depends on only the 
header. (using summary there is only one summary CRC check)

Later (when the data is readed or in the background by GC) the node_crc 
will also be checked. GC is running on a "niced" (10) priority, so it 
should not disturb any other process.

If I am right the CRC protects against unclean reboots and hardware 
corruptions. If you need we can modify the summary patch not to check 
node_crc for summarized nodes (where the unclean reboots is no problem), 
but if we do it you lose the ability to detect the hardware corruption 
(flash errors). Unfortunatelly NOR flash doesn't have any error detection.

Bye,
Ferenc




More information about the linux-mtd mailing list