LEB size configuration
dedekind1 at gmail.com
Wed Jul 22 10:53:18 EDT 2009
On 07/22/2009 05:32 PM, Canella Matteo wrote:
> Hi Adrian, thank you for your reply,
>> The possibility exists to double the eraseblock size by treating 2
>> eraseblocks as
>> though it was 1. That should halve the UBI load time to 3 seconds but
>> it would
>> use a bit more memory in UBIFS. Of course you could double again, with
>> more memory required by UBIFS.
> I'm a little bit jammed... I surfed all the docs and faqs but I can't find the answers.
> I'm trying to double the logical erase block size.
> I've a 1Gb NAND flash.
> Here's my steps:
> Looking to the old dmesg of the flash mounting I see:
> [ 6.705712] UBI: logical eraseblock size: 126976 bytes
> First question: Why LEB size needs to be smaller than PEB size? PEB size is 128KiB = 131072 byte. Is it mandatory to have LEB size smaller than PEB size? How much smaller?
You cannot improve your UBI attach time without doing coding,
unfortunately. If you are ready to do coding, you should really
go through UBI documentation. It answers your question.
> Whatever, I try to double this value:
> mkfs.ubifs -m 2048 -e 253952 -c 4096 -o ubifs.img
Sorry, but you really should spend more time reading docs if you want to
improve UBI/UBIFS. From what I see you do not really distinguish between
UBI and UBIFS.
> the "-e" option is the LEB size (126976 * 2 = 253952)
> "-c" option is the max LEB count, so I guess 4096 for 1 Gigabyte is the right number.
The suggested change should be done either on MTD level, or on UBI level.
The FAQ entry I wrote for you briefly explains how one could do this on
> Here I've got an error and the logical eraseblock size that isn't what I expected (126976 instead of 253952).
Yes, you have created UBIFS image for larger LEB, but UBI does not support
it, so you see errors because of that disagreement.
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd