ubi : kernel panic on erroneous block

Artem Bityutskiy dedekind1 at gmail.com
Tue Aug 10 07:42:27 EDT 2010

On Tue, 2010-08-10 at 11:56 +0200, Matthieu CASTET wrote:
> Hi,
> when running test with ubifs I found the following crash.
> One block is instable (some read fails with ecc error correctable or 
> not) after a power cut. This is due to interrupted write or erase.
> Our test do first a read of the ubi volume (cat /dev/ubi3_0 > /dev/null) 
> to force complete read of it.
> In this case ecc correctable is detected, and scrubbing is scheduled
> But ubi_eba_copy_leb: the block become uncorrectable and added to 
> erroneous list.
> When mounting ubifs read doesn't check that it is erroneous and return data.
> It is added again for scrubbing, but prot_queue_del crash because we 
> already remove it in the first scrubbing try.
> Here an attempt to fix the problem. This is ugly. I didn't try it yet. I 
>   erased my corrupted flash by accident.
> One other solution could be to add the test in ubi_wl_scrub_peb, but I 
> don't think it is ok to return data on erroneous block.
> An other solution could be to unmap the block (read will return 0xff), 
> but this may break upper layer ?

Matthieu, unfortunately I'm on holidays so cannot really look at this.
And I already have a lot of UBI/UBIFS issues waiting for me to look at.
I think I'll start looking at the things only in mid-September/October.
Sorry for this. But may be Adrian could take a look at this, if he has
some time? :-)


More information about the linux-mtd mailing list