Re: [Yaffs] will YAFFS mark a block bad if ECC failure happe…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ricard Wanderlof
Date:  
To: peterlingoal
CC: yaffs@lists.aleph1.co.uk
Subject: Re: [Yaffs] will YAFFS mark a block bad if ECC failure happens at checkpoint block?

On Tue, 23 Oct 2012, peterlingoal wrote:

> Will YAFFS apply same block retiring policy to the check pointing block?
> I asked this question because I've noticed sometimes MTD driver is
> reporting un-correct ECC failure but number of bad blocks is not
> increased.


An ECC failure in itself does not indicate that the block is bad, just
that the data has deteriorated. The phenomenon (usually called read
disturb) is well known of NAND flash devices, even if different devices
exhibit the effect to different degrees.

What should happen is that once ECC starts reporting that ECC correction
is taking place, some layer should rewrite the data elsewhere and erase
the original block for re-use.

The critera for considering a block bad are somewhat diffuse. The flash
chip itself can report that a write or erase operation failed, but by then
the block is usually in a very bad state (very low data retention
capability), far below spec. The most ideal would probably be some
combination of a limit on the number of erase/write cycles and measurement
of how long time has passed between writing the block and subsequent read
errors. Since flash chips have a specification on the number of
erase/write cycles that can be peformed (e.g. 100 000 for a typical SLC
NAND flash), it would make sense to mark a block as bad if it has been
through this many cycles. Additionally if the time between writing a block
and reading-with-ECC-errors is below a certain limit it indicates that the
data retention is too low for practical use and the block should be
retired.

I suspect YAFFS doesn't do much of this (but I'm by no means a YAFFS
expert); the mtd layer certainly doesn't.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30