UBI: badblock management confusion!

Adrian Hunter ext-adrian.hunter at nokia.com
Mon Apr 28 07:58:21 EDT 2008


ext Nancy wrote:
>>> Oh, thank you for ponting out my mistake!
>>> You mean UBI admit the amount of current badblocks are part of
>>> reserved PEBs, right?
>>>
>> Not exactly.  It is just that UBI does not mind if there are not enough
>> PEBs to meet the number desired for bad-block handling.
>>
>>> If the answer is yes, then the volume size I'm goting to create should
>>> be equal to
>>>
>>> (total number of PEB this ubi device has - total number of reserved
>>> PEBs) * LEB size
>>>
>>> not what UBI think:
>>> (number of good PEBs - total number of reserved PEBs) * LEB size
>>>
>>> Am I right?
>>>
>> I am not sure what you are trying to achieve.  You can always use
>> the -m option of ubimkvol to set volume size to maximum available size.
>>
> Let me clarify the problem I met:
> 	there are so many Nand flash for burning. Each one of them may have
> different numbers of badblocks, but that number do not exceed the reserved
> badblock number. Each one of them should have the same maximum avaliable
> volume size. But the practice tell no, the maximum avaliable volume size
> effect by number of badblocks the current MTD partition has. That's wrong.
> You can try by yourself.
> 

The following section from UBI documentation may help you:

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

Let us know if it doesn't meet your needs.



More information about the linux-mtd mailing list