Skip to contentSkip to conversation

how to properly calculate max-leb-cnt and vol_size for ubifs

DISCUSSION twebb 2 participants 3 messages Dec 3, 2009 – Dec 21, 2009 Memory technology devices (MTD)

lore
Share & tools
lore

twebb

author
#0 lore raw

I'm using ubifs for the first time and am confused about how to calculate two parameters:

"max-leb-cnt" for mkfs.ubifs
"vol_size" for ubinize cfg file

How should "max-leb-cnt" be calculated? In the examples, how is "-c 2047" determined? Should the max-leb-cnt calculation somehow include the overhead calculated per the ubifs documentation page? Should the reserved PEBs (1% default for NAND flash) be somehow taken into account?

How should "vol_size" be calculated? Is it simply max-leb-cnt * LEB_size? Should overhead somehow be included in this calculation also?

Thanks for the help,
twebb

#1 lore raw
Quoted 12 lines · twebb

I'm using ubifs for the first time and am confused about how to calculate two parameters:

"max-leb-cnt" for mkfs.ubifs
"vol_size" for ubinize cfg file

How should "max-leb-cnt" be calculated? In the examples, how is "-c 2047" determined? Should the max-leb-cnt calculation somehow include the overhead calculated per the ubifs documentation page? Should the reserved PEBs (1% default for NAND flash) be somehow taken into account?

Quoted 3 lines

How should "vol_size" be calculated? Is it simply max-leb-cnt * LEB_size? Should overhead somehow be included in this calculation also?

Have you read:

http://linux-mtd.infradead.org/faq/ubifs.html#L_max_leb_cnt

http://linux-mtd.infradead.org/faq/ubi.html#L_ubi_mkimg

http://linux-mtd.infradead.org/doc/ubi.html#L_autoresize

author
#2 lore raw
Quoted 17 lines
Quoted 13 lines

I'm using ubifs for the first time and am confused about how to calculate two parameters:

"max-leb-cnt" for mkfs.ubifs
"vol_size" for ubinize cfg file

How should "max-leb-cnt" be calculated?  In the examples, how is "-c 2047" determined?  Should the max-leb-cnt calculation somehow include the overhead calculated per the ubifs documentation page?  Should the reserved PEBs (1% default for NAND flash) be somehow taken into account?

Quoted 3 lines

How should "vol_size" be calculated?  Is it simply max-leb-cnt * LEB_size?  Should overhead somehow be included in this calculation also?

Quoted 9 lines

Have you read:

http://linux-mtd.infradead.org/faq/ubifs.html#L_max_leb_cnt

http://linux-mtd.infradead.org/faq/ubi.html#L_ubi_mkimg

http://linux-mtd.infradead.org/doc/ubi.html#L_autoresize

I have, and I'm still pretty confused. I just posted some additional questions I'm hoping perhaps you or someone else may be able to help with.

Thanks,
twebb