UBI/UBIFS interrupted write page handling

Artem Bityutskiy dedekind1 at gmail.com
Sun Sep 26 13:58:31 EDT 2010


On Sat, 2010-09-25 at 16:15 +0100, Matthieu Castet wrote:
> I ported our board bsp to ubi-2.6.git and merged ubifs-2.6.git. It
> will be easier to test. Once we get a stable version, I will backport
> it.

Good idea, thanks. You'll also test my latest changes then, which is
very nice!

> Here is the first result.
> 
> After some hours (5), I got "UBI error: check_data_ff: PEB 20 contains
> corrupted VID header, and the data does not contain all 0xFF, this may
> be a non-UBI PEB or a severe VID header corruption which requires
> manual inspection" error.

OK, this is bogus I think.

> I will sent you the dump in a private message for not spamming
> everybody. The block look like an interrupted erase block ; near all
> 0xff, unless some bits a the end (0xf7, 0xfb, 0xef, ...)
> 
> The test is still running, but because for each boot we got this slow
> dump (take near 1 min), I expect others errors to take longer to
> appear.

Your PEB 20 contains almost all 0xFFs, but not quite, and NAND pages are
read with ECC errors. I think this is a result of power cut during
erasure.

My new patch-set is trying to detect situations when we have a PEB which
contains important data, but its VID header is corrupted. We try to
preserve such PEBs instead of erasing. UBI would not spam so much if
debugging was disabled.

But there was an issue in these new changes - your PEB 20 was also
preserved, but obviously, this is wrong.

Here is the patch which applies on top of what you have and which should
fix this problem. You can find this also in ubi-2.6.git / old

However, since I did not push my "preserve PEBs" patch to the linux-next
branch, I can re-base it. So I actually modified my original patches and
incorporated these changes. So ubi-2.6.git / master was rebased, and it
contains the same changes as I'm sending to you.

So you can either just apply my patch on top, or sych with ubi-2.6.git /
master.



More information about the linux-mtd mailing list