ubi_wl_get_peb: Unable to get a free PEB from user WL pool

Richard Weinberger richard at nod.at
Thu Aug 6 00:30:44 PDT 2015


Jörg,

Am 06.08.2015 um 00:17 schrieb Jörg Krause:
>>>> Then just disable it. :)
>>>
>>> I did :) I thought fastmap is used automatically by the UBI driver?
>>
>> It will *use* fastmap automatically but not convert non-fastmap UBI 
>> images
>> to fastmap.
>> You can enable ubi.fm_autoconvert to do so.
> 
> Sorry for asking, but how do I create an UBI image with fastmap
> support? I've never read something about this.

You have to use the ubi.fm_autoconvert parameter. The UBI will automatically
write down a fastmap if needed.

Currently it is not possible to create a fastmap-enabled UBI image
using ubinize.
The reason is that fastmap stores the LEB->PEB mappings to allow
a fast attach. ubinize cannot know which PEBs are bad.
So, we'd need a tool which creates the fastmap while flashing to the nand.

>>>> Meanwhile I'll find out what exactly is going on.
>>>
>>> Many thanks!
>>
>> Can you please apply the attached debug patch?
>> I wonder why exactly the auto resize function is failing.
> 
> autoresize: cannot auto-resize volume 0: -28

I have good and bad news.
The good news is that I know what is going on, the bad one
is that I don't have an good solution for it.

UBI is requesting a new PEB but your system is still busy with
erasing them. With fastmap disabled UBI can use produce_free_peb()
and wait for a new erased PEB.
But fastmap cannot use this helper as it releases ->wl_lock
and would lead to a inconsistent fastmap state.
Kernels < 4.1 did so and faced interesting fastmap corruptions.
I hoped using the current retry logic the issue you're facing cannot
happen. But as it seems I was wrong.

Can you please give the attached patch a try?

Thanks,
//richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dirty_hack.diff
Type: text/x-patch
Size: 490 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20150806/51e4ae8f/attachment.bin>


More information about the linux-mtd mailing list