autoresize causes insufficient reservation of PEBs for bad PEB handling

Richard Weinberger richard.weinberger at gmail.com
Mon Jul 6 14:39:34 PDT 2015


Hi Samuel,

On Mon, Jul 6, 2015 at 1:04 PM, Egli, Samuel <samuel.egli at siemens.com> wrote:
> Hi all,
>
> I have difficulties to understand why I get the following warning message
> at linux start up:
>
> ...
> [    4.777488] UBI warning: print_rsvd_warning: cannot reserve enough PEBs \
> for bad PEB handling, reserved 40, need 80
> ...
>
> My assumption is that if I don't specify the size of one volume
> UBI will choose the right size for the volume and reserve the
> right amount of PEBs for bad block handling. With 20/1024 set,vi I
> expect indeed to have 80 blocks reserved. But somehow this
> does not work. I observed that I get this warning when vol_flags
> is set to autoresize. In this case only 40 blocks get reserved.
> Using for all volumes the vol_size parameter and omitting
> autoresize, I can avoid this situation and I get my 80 blocks reserved.
>
> However, I don't understand why and it seems odd to me that
> autoresize would work this way.
>
> Can somebody confirm this observations or explain why this
> works like this. Maybe I'm also doing something wrong.

I'm a bit puzzled. Can you please share the full kernel log?
Maybe some other UBI warning brings light into that.
Please also share the output of ubinfo -a with and without autoresize.

The re-size mechanism will use ubi->avail_pebs for the new volume size.
ubi->avail_pebs should honor the number of reserved PEBs.
If you have a lot of bad/corrupted PEBs the situation may be different.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list