ubifs mount fails due to corrupt empty space

Matthieu CASTET matthieu.castet at parrot.com
Fri Jan 13 04:58:21 EST 2012


Gabriel Matni a écrit :
> Hello list,
> 
> Using kernel 3.2, ubifs failed to mount a fs properly due to a corrupt
> empty space encoutered while replaying the journal. Please notice the
> bitflip occurring in the supposedly empty space shown in the log below.
> The storage medium is an SLC NAND flash.
> 
> The stack dump shown below shows that replay_log_leb() was behind the
> call to ubifs_scan(), and could not deal with the -EUCLEAN error
> returned. ubifs_scan() returned this error because it detected the
> corrupt empty space.
> 
> The fs was unmounted cleanly, resulting in no need for fs recovery to
> happen during the mount (need_recovery=0). Therefore the recovery of the
> log_leb in question couldn't be performed, causing the mount to abort.
> This problem was also seen in the following thread:
> http://lists.infradead.org/pipermail/linux-mtd/2009-March/024953.html
> <http://lists..infradead.org/pipermail/linux-mtd/2009-March/024953.html> with
> a NOR flash
>  
> I applied the attached patch and the fs was successfully mounted giving
> the fs a second life.
> 
> My main questions are:
> 1) What should be the expected behavior of ubifs in this case?
> 2) Is there a systematic way to recover from a situation like that?
ubifs expect empty space to be protected by ecc. But if empty page ecc is not
ff, this need hack in the nand driver.



Matthieu



More information about the linux-mtd mailing list