mounting jffs2

Zoltan Sogor weth at inf.u-szeged.hu
Tue Apr 26 09:35:22 EDT 2005


Hi Artem!

Artem B. Bityuckiy wrote:

>Because what your option does is
>
>+#ifdef CONFIG_JFFS2_SUMMARY_NOCRCCHECK	
>+	ic->state = INO_STATE_CHECKEDABSENT;
>+#endif
>
>which is incorrect. You should not skip the checking process for inodes.
>When I proposed not to check CRCs I meant another thing. And now I'm
>uncertain that what I proposed is absolutely correct.
>
>Please, bear in mind that the primary goal of the checking process is
>not to check CRCs but rather to detect which nodes are valid, which are
>obsolete. This is done by building fake fragtrees.
>
>Correct me if I'm wrong.
>  
>
I think our nocrc support works fine, and it is correct.

Everything is checkd and built but not at mount time. It will be checked
at the moment when you want to use the inode:

Mount:
Function jffs2_do_crccheck_inode() calls jffs2_do_read_inode_internal(),
which calls jffs2_get_inode_nodes() to collect some necessary info and
do sanity checks (crc, page boundary, ...).
After then jffs2_get_inode_nodes() can appoint which node is valid and
which is obsolated.

Read:
If you want to read an inode then the kernel calls jffs2_do_read_inode()
to get the inode.
jffs2_do_read_inode() checks that the inode is in which state
(UNCHECKED, CHECKEDABSENT, PRESENT, CHECKING, ...) In our point of view
state UNCHECKED and CHECKEDABSENT are the same, it means that in both
cases it calls jffs2_do_read_inode_internal().

In both situation nodes are checked.

I think it is necessery because if you mount the fs as readonly these
checks should happen.

Zoltan Sogor










More information about the linux-mtd mailing list