Unable to remount ubifs after many unclean reboot

Richard Weinberger richard at nod.at
Fri Nov 25 06:49:48 PST 2016


Oliver, Marek,

On 25.11.2016 15:13, Marek Vasut wrote:
> So you're using ancient unsupported kernel version and a controller/CPU
> which you do not disclose. It's hard to help.
> 
> Can you check whether this problem still happens in mainline?
> 
> Are you using MLC NAND ? I suspect you do ...

Why do you think so?

> . Using a
>> simple test program, I am able to have UBIFS to fail to mount the NAND
>> partition (I am using pretty much all the 4GB of the NAND). The test
>> is quite simple: mount the ubifs partition at boot time, then write a
>> file (justa  few KB), do a sync, wait a few seconds, and then reboot
>> (/sbin/reboot, and -important point- I have a micro-controller which
>> does a power-cycle). Intentionally, I did NOT unmount the ubifs
>> partition. Later on, I changed the test to unmount the ubifs partition
>> (but I still do not detach the ubi volume). What I am seeing is that
>> after many iterations (usually around a thousand), ubifs could not
>> mount the ubifs partition, both under u-boot and Linux.
>>
>> Under Linux, this is what I see when ubifs try to mount the partition:
>>
>> [   55.646884] UBIFS: background thread "ubifs_bgt0_0" started, PID 858
>> [   56.013037] UBIFS: recovery needed
>> [   56.258731] UBI warning: ubi_io_read: error -119 while reading
>> 294912 bytes from PEB 600:753664, read only 294912 bytes, retry
>> [   56.320616] UBI warning: ubi_io_read: error -119 while reading
>> 294912 bytes from PEB 600:753664, read only 294912 bytes, retry
>> [   56.382444] UBI warning: ubi_io_read: error -119 while reading
>> 294912 bytes from PEB 600:753664, read only 294912 bytes, retry
>> [   56.444263] UBI error: ubi_io_read: error -119 while reading 294912

-119?!
What is this errno on your platform?
I suspect it is not -ENAVAIL - "No XENIX semaphores available" ;)

>> I thought that the whole idea of ubifs was to be protected again
>> unexpected loss of power. I understand that obviously I could loose
>> some data, but at least ubifs should be able to mount the partition.

Correct. UBIFS most not die in such a situation.

Thanks,
//richard



More information about the linux-mtd mailing list