All of lore.kernel.org
 help / color / mirror / Atom feed
* autoresize causes insufficient reservation of PEBs for bad PEB handling
@ 2015-07-06 11:04 Egli, Samuel
  2015-07-06 21:39 ` Richard Weinberger
  2015-07-07 10:50 ` Richard Weinberger
  0 siblings, 2 replies; 14+ messages in thread
From: Egli, Samuel @ 2015-07-06 11:04 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org

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.

See below how I generate the ubi image.

General setup
=============
flash size: 4096 PEBs
mtd partition size: 4065 PEBs
number of volumes: 3

Linux version:
Linux dxr2 3.14.36-r2 #1 PREEMPT Tue Jun 30 10:26:05 CEST 2015 armv7l GNU/Linux


Config 1
========
2 volumes with fixed size
1 volume has vol_flags=autoresize and vol_size not defined

mkfs.ubifs -r ../rootfs/path -o rootfs.ubifs -F -m 2048 -e 126976 -c 4065
mkfs.ubifs -r ../conf/path -o conf.ubifs -F -m 2048 -e 126976 -c 4065
ubinize -o rootfs.ubi -m 2048 -p 131072 -O 2048 ubinize.cfg

ubinize.cfg:
 [rootfs_a]
 mode=ubi
 image=rootfs.ubifs
 vol_id=0
 vol_type=dynamic
 vol_name=rootfs_a
 vol_size=140MiB
 [rootfs_b]
 mode=ubi
 vol_id=1
 vol_type=dynamic
 vol_name=rootfs_b
 vol_size=140MiB
 [configuration]
 mode=ubi
 image=configuration.ubifs
 vol_id=2
 vol_type=dynamic
 vol_name=configuration
 vol_flags=autoresize

--> only 40 blocks get reserved vor bad PEB handling

Config 2
========
All 3 volumes with fixed size

mkfs.ubifs -r ../rootfs/path -o rootfs.ubifs -F -m 2048 -e 126976 -c 4065
mkfs.ubifs -r ../conf/path -o conf.ubifs -F -m 2048 -e 126976 -c 4065

ubinize.cfg:
 [rootfs_a]
 mode=ubi
 image=rootfs.ubifs
 vol_id=0
 vol_type=dynamic
 vol_name=rootfs_a
 vol_size=140MiB
 [rootfs_b]
 mode=ubi
 vol_id=1
 vol_type=dynamic
 vol_name=rootfs_b
 vol_size=140MiB
 [configuration]
 mode=ubi
 image=configuration.ubifs
 vol_id=2
 vol_type=dynamic
 vol_name=configuration
 vol_size=341MiB

--> ok, 80 blocks reserved but cannot use autoresize

Kind ragards

Sam

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-07-09 10:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 11:04 autoresize causes insufficient reservation of PEBs for bad PEB handling Egli, Samuel
2015-07-06 21:39 ` Richard Weinberger
2015-07-07  7:57   ` Egli, Samuel
2015-07-07 21:09     ` Richard Weinberger
2015-07-08  7:26       ` Egli, Samuel
2015-07-09 10:23       ` Egli, Samuel
2015-07-09 10:29         ` Richard Weinberger
2015-07-07 10:50 ` Richard Weinberger
2015-07-07 10:59   ` Egli, Samuel
2015-07-07 11:04     ` Richard Weinberger
2015-07-07 11:19       ` Egli, Samuel
2015-07-07 11:24         ` Richard Weinberger
2015-07-07 11:27           ` Egli, Samuel
2015-07-07 19:43             ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.