UBI corruption on a NOR flash

Norbert van Bolhuis nvbolhuis at aimvalley.nl
Thu Jan 10 05:28:37 EST 2013


On 01/09/13 14:43, Bosi Daniele wrote:
> Hello List,
> we are working on an embedded device running on Linux 2.6.24.6.
> We had some devices returned from the field with corrupted UBI partitions on a NOR flash.
> The corruption was probably caused by a power cut, but we aren't sure about the root cause of the failure.
>
> We found a similar issue in an old thread from the mailing list where Artem said that UBI on NOR could have some bugs that can lead to such a failure (http://lists.infradead.org/pipermail/linux-mtd/2009-May/025737.html), but no final statements was given on that thread.
>
> Any help would be appreciated, thank you.
>


I believe the final statement of the referred thread was that one
of the problems was UBI/UBIFS assumes a (CFI) write buffer size of
8 bytes. This is often not the case with NOR flash. It did not lead
to kernel patches though.

Lateron this problem was found (again) by Anatolij Gustschin
(see the thread "UBIFS partition on NOR flash not mountable after power cut test"
from december 2010) and he fixed it properly. His patches ended up in the mainline.

Btw. it could be your problem is another or a related ubi/ubifs NOR flash power
cut problem. Some other problem have been found and solved as well (mostly by Artem
and Anatolij).

If you update to the ubi/ubifs backported linux-2.6.32 (this is the oldest one
still available) which can be found here:
http://git.infradead.org/users/dedekind/ubifs-v2.6.32.git
you'll probably be fine.

hth,
Norbert van Bolhuis



More information about the linux-mtd mailing list