public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* bit flip
@ 2007-10-03 19:32 catboat
  2007-10-10  4:48 ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: catboat @ 2007-10-03 19:32 UTC (permalink / raw)
  To: linux-mtd


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bit flip
  2007-10-03 19:32 bit flip catboat
@ 2007-10-10  4:48 ` David Woodhouse
  2007-10-10 15:37   ` catboat
  0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2007-10-10  4:48 UTC (permalink / raw)
  To: catboat; +Cc: linux-mtd

On Wed, 2007-10-03 at 14:32 -0500, catboat@texas.net 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.

> 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.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bit flip
  2007-10-10  4:48 ` David Woodhouse
@ 2007-10-10 15:37   ` catboat
  2007-10-10 17:58     ` Matt Reimer
  0 siblings, 1 reply; 4+ messages in thread
From: catboat @ 2007-10-10 15:37 UTC (permalink / raw)
  To: David Woodhouse; +Cc: catboat, linux-mtd

Quoting David Woodhouse <dwmw2@infradead.org>:

> On Wed, 2007-10-03 at 14:32 -0500, catboat@texas.net 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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bit flip
  2007-10-10 15:37   ` catboat
@ 2007-10-10 17:58     ` Matt Reimer
  0 siblings, 0 replies; 4+ messages in thread
From: Matt Reimer @ 2007-10-10 17:58 UTC (permalink / raw)
  To: catboat@texas.net; +Cc: linux-mtd

On 10/10/07, catboat@texas.net <catboat@texas.net> wrote:
> Quoting David Woodhouse <dwmw2@infradead.org>:
>
> > On Wed, 2007-10-03 at 14:32 -0500, catboat@texas.net 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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-10 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 19:32 bit flip catboat
2007-10-10  4:48 ` David Woodhouse
2007-10-10 15:37   ` catboat
2007-10-10 17:58     ` Matt Reimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox