bit flip
Hello all,
A NAND card flipped a bit and caused a data CRC problem in a data node. When I cat the file, this region is zeroes. cat exits with rc 0.
I can simulate this. I made a jffs2 file system using mkfs.jffs2. In a file with multiple data nodes, I manually flip a bit in one of them. At mount time, I see a printk about it. cat exits with 0 and the file has a chunk of zeroes in it.
Seems incorrect to me. I expected jffs2 to return EIO somewhere.
Does it seem incorrect to you?
Monte Copeland
IBM Austin
Quoted 2 lines · On Wed, 2007-10-03 at 14:32 -0500, [email protected] wrote:
A NAND card flipped a bit and caused a data CRC problem in a data node. When I cat the file, this region is zeroes. cat exits with rc 0.
On NAND you should have ECC to prevent this failure mode.
Quoted 8 lines
I can simulate this. I made a jffs2 file system using mkfs.jffs2. In a file with multiple data nodes, I manually flip a bit in one of them. At mount time, I see a printk about it. cat exits with 0 and the file has a chunk of zeroes in it.
Seems incorrect to me. I expected jffs2 to return EIO somewhere.
Does it seem incorrect to you?
We could probably manage that -- there should never be any _holes_ in the file. It's not a panacea though, because sometimes if the latest node is corrupted you might just see 'old' dirty data from an earlier version, rather than a hole.
Signature · 1 line
dwmw2
Quoting David Woodhouse <[email protected]>:
Quoted 5 lines · On Wed, 2007-10-03 at 14:32 -0500, [email protected] wrote:
Quoted 2 lines
A NAND card flipped a bit and caused a data CRC problem in a data node. When I cat the file, this region is zeroes. cat exits with rc 0.
On NAND you should have ECC to prevent this failure mode.
We took two bit flips within the same 256 byte subpage. To my knowledge ECC won't correct it, but should have returned an error. I think UBI handled the error and copied what it could to a new erase block. After that, the ECC words were correct again, but not the jffs2 CRC check.
Regarding a change to the code, jffs2 needs to track data nodes that have CRC problems instead of marking them obsolete. Maybe a new node type could represent this and save recalculating CRCs everywhere. Until these nodes are rewritten with newer data, I would expect readers of the nodes to get EIO.
Monte
Quoted 5 lines · On 10/10/07, [email protected] <[email protected]> wrote:
Quoting David Woodhouse <[email protected]>:
Quoted 3 lines · On Wed, 2007-10-03 at 14:32 -0500, [email protected] wrote:
Quoted 2 lines
A NAND card flipped a bit and caused a data CRC problem in a data node. When I cat the file, this region is zeroes. cat exits with rc 0.
How big were the chunks of zeroes? I'm seeing something similar here on a 128KB/2KB NAND flash part, where a 4KB chunk incorrectly reads as zeroes.
Is there some kind of utility to map from a jffs2 inode to an offset in flash? That would help me track down the corruption I'm seeing.
Matt