Mount empty UBI volume attached via fastmap may not work

Richard Weinberger richard at nod.at
Wed Apr 26 06:48:10 PDT 2017


Jimmy,

Am 26.04.2017 um 13:39 schrieb Jimmy Perchet:
>> I'm slow today. I think now I got your problem scenario.
>> You erase all blocks of a volume, face a power-cut before all blocks
>> got erased and then UBIFS fails upon mount since it thinks everything
>> is fine.
> Almost; the power-cut occurs after the update operation :
> 
> $umount data/
> 
> $ubiupdatevol -t /dev/ubi0_0

Ah...

> $cat /sys/class/ubi/ubi0_0/corrupted
> 0
> 
> /*==Power-cut==*/
> 
> $mount -t ubifs /dev/ubi0_0 data/
> 
> UBIFS fails to create the default file-system. My guess is that,
> as Fastmap is used, some LEB may be seen as mapped, and
> this not handled by UBIFS emptiness test.

Yes, this guess might be correct.
Let me think about a better way to handle this.

Thanks,
//richard



More information about the linux-mtd mailing list