UBIFS recovery fails

Artem Bityutskiy dedekind1 at gmail.com
Thu Oct 20 12:43:41 EDT 2011


On Tue, 2011-10-18 at 11:10 -0400, Jean-Sébastien Gagnon wrote:
> If you cut power during a page programming operation, you can easily get more
> unstable bits than what the manufacturer-specified ecc supports (for instance,
> 3 unstable bits on a 1bit-ecc device). We experienced this on several different
> devices.
> Having a lot of bitflips (more than what ecc supports) is not the problem here:
> the page was indeed partially programmed, it contains garbage and its contents
> should be discarded.
> 
> The real problem appears when those faulty bits are unstable: during the first
> few read attempts, the page may be successfully read (possibly with ecc
> corrections); and then, a bit later, the page becomes unreadable because of too
> many faulty bits.

Right. If you first get a correctable bit-flip, UBI will schedule this
PEB for scrubbing. When the background thread starts scrubbing, it will
read the PEB _again_, and this time it can end up with an uncorrectable
ECC error.

This is probably also a good point: when UBIFS recovers, it should
probably somehow ask UBI to _not_ do scrubbing, to avoid failures at UBI
level if UBI decides to scrub a PEB before UBIFS erase-cycles it.

IOW, the whole stack (not only UBIFS) should make sure the PEBs with
unstable bits are read only once.

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20111020/36185a7a/attachment.sig>


More information about the linux-mtd mailing list