jffs2_scan_inode_node(): Data CRC failed on node at ... Read ... calculated ...

【问题】jffs2_scan_inode_node(): Data CRC failed on node at ... Read ... calculated ...
Empty flash at ...
之前用jffs2的时候,就遇到过此问题,但是一直没有搞懂具体的原因。
今天去google了一下,找到一些解释,说的应该是比较清楚了,
现摘录如下:

1.
http://www.infradead.org/pipermail/linux-mtd/2004-May/009725.html

"I have had similar problems to this. As you reboot you must make sure that root is
remounted read only. If you don't a reboot can cause the JFFS2 garbage collector to
be stopped mid operation. JFFS2 is verbose in error reporting. I suspect that your
files are still ok. There was a bug in the JFFS2 layer which caused the garbage
collector not to flush it's write buffer on remount read only. This would not screw up
the filesystem but it would generate messages for uncleanly finished garbage
operations. I have discussed this recently and it should be available via CVS now.

I have had discussions about the empty flash messages too. It seems it is not a
problem. If the message concerns you move it to KERN_DEBUG
"
2.
http://lists.infradead.org/pipermail/linux-mtd/2003-January/006861.html
"
Nothing's corrupted. It's probably because the machine was powered off or
rebooted while it was busy garbage-collecting. As it writes out new
replacement nodes before the old ones are marked obsolete, if you interrupt
it, it means that the original node will have remained intact on the flash
-- only the new node which was _going_ to replace it is broken, and that's
part of what the CRC check is there for.

It'll go away in time when the block in which the offending node resides is
garbage collected.
"

3.这里有详细的讨论,可以貌似后面的偶看不懂,没看出是否有提供什么好方法了:

  • CRC error after power off, Tino Keitel
    • Re: CRC error after power off, David Woodhouse
      • Re: CRC error after power off, Tino Keitel
      • Re: CRC error after power off, David Woodhouse
        • Re: CRC error after power off, Tino Keitel
        • Re: CRC error after power off, David Woodhouse
    • <Possible follow-ups>
    • RE: CRC error after power off, Paul Nash
      • Re: CRC error after power off, David Woodhouse
    • RE: CRC error after power off, Paul Nash
      • Re: CRC error after power off, David Woodhouse
        • Re: CRC error after power off, johana
        • Re: CRC error after power off, David Woodhouse
        • Re: CRC error after power off, johana
        • Re: CRC error after power off, David Woodhouse

    总结一下就是,估计是在写操作(比如,jffs2垃圾回收过程)中,你正好关机或重启了,
    使得Jffs2中,新的节点,要写入的节点,没来得及写入flash,就丢失了。
    而旧的节点,由于没有被标记为“废弃的”,所以,每次系统启动去检查这些数据,
    就会校验错误。

    【解决办法】
    声明,我自己并没去实现过。只不过想到这样做,也许是可以的。
    既然知道了,这个不是错误,对使用没啥影响,
    那么一个很弱智的办法就是,去源码里面,把此警告注释掉。。。
    此外,最好的办法,也就只能等对JFFS2垃圾回收机制清楚的人,去及时解决此bug,
    更新源码了。。。

  • 你可能感兴趣的:(Google,Flash,buffer,cvs,Go,layer)