UBIFS partition on NOR flash not mountable after power cut test

Artem Bityutskiy dedekind1 at gmail.com
Wed Dec 1 22:46:15 EST 2010


On Mon, 2010-11-29 at 19:50 +0100, Anatolij Gustschin wrote:
> Hello,
> 
> using kernel 2.6.34.7 with applied UBI/UBIFS back-port patches from
> 2.6.34 UBIFS back-port tree and an UBIFS filesystem in a partition
> on Spansion NOR Flash S29GL512P (2 x16 chips in a 32-bit bank) we are
> not able to mount the filesystem after around 30 power cut test
> cycles. Has anyone seen similar issues before?

Hi, so, as other people indicated, the problem comes from the write
buffer size. In short, UBIFS issue you see is because of incorrect UBIFS
assumptions how your flash writes data. The right way to fix it, IMO,
is to report your write buffer size in 'struct mtd_info' and make
UBI/UBIFS use it as min_io_size. Now min_io_size is 1 for NOR in UBI and
8 in UBIFS, hardcoded.

Try to make mtd->writesize = 8 in your setup, and test again, it should
work better.

If you are interested to know why exactly UBIFS dies, what it complains
about, I can try to provide some explanation.

HTH.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list