JFFS2 an nodes checking

Artem B. Bityuckiy abityuckiy at yandex.ru
Tue Sep 28 08:29:07 EDT 2004


Hello. I have a question that a wanted to ask just after I've known 
JFFS2. For some reasons I didn't ask it yet.


When JFFS2 is being mounted, all the node header CRC checksums (hdr_crc 
and node_crc) are checked. The data CRC checksums (data_crc) aren't checked.

The data CRCs are checked by either Garbage Collector or on iget() 
request when the inode cache is being built.

To check the regular file inode's CRC the whole it's content must be 
read. This may be time-expensive in case of big file. Especially if the 
NAND flash device is used.

Why when user opens a big file he need to wait while all it's contents 
will be read? Moreover, the CRCs are checked anyway on any read request 
(of course, for nodes which are involved to this request). Is this delay 
really needed? Why not to just leave the inode in the 
INO_STATE_UNCHECKED state - the Garbage Collector will check it some 
time? ....

It seems OK for me when the Garbage Collector checks CRCs in background, 
but the delay on the iget() request doesn't seem to be necessary.

Did I miss something?

Thanks in advance.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.




More information about the linux-mtd mailing list