State of read-only filesystems in NAND / MTD bad blocks handling when reading

Thilo Fromm fromm at dresearch-fe.de
Fri May 4 03:36:54 EDT 2012


Hello Atlant,

thanks for your clarification. It really helps me with getting in
touch with all the MTD subsystem details.

>> I find this whole MTD / UBI thing, let alone UBIFS, incredibly blurry.
>> There seems to be no consequent abstraction between the "layers" mtd,
>> ubi, ubifs, let alone unique responsibilities for either of the
>> layers.
>
>  I can answer that one.
>
>  MTD "materializes" an imperfect block storage device. It contains
>  m PEBs (Physical Erase Blocks) of n pages each. It can erase whole
>  PEBs, write pages, and read pages, but some of these pages are
>  bad, other pages may go bad, and you have to be aware that you
>  can wear out PEBs by repeated erasures.

Then why do I still see this intermediate level materialize in /dev/?
Why do I need to do management tasks from user space on this level in
order to get UBI up and running? Why doesn't UBI wrap this? Legacy?

>  UBI (on top of MTD) "materializes" a perfect block storage device.

UBI is a block device? Don't think so. I have got the impression UBI
is still something "special" which does not quite fit in the regular
Linux storage stack.

>  It contains a maximum of m-fudge_factor LEBs (Logical Erase Blocks)
>  of n-ovehead pages each. It can erase whole LEBs, write pages, and
>  read pages. By providing bad block mapping and wear leveling, it
>  provides a device which is slightly smaller than the MTD device
>  it's layered upon, but that device doesn't have bad blocks and
>  you can't wear out any individual LEB faster than the whole
>  device wears out. The device remains perfect until its reserve
>  of replacement (spare) blocks is exhausted as blocks go bad.

But unfortunately I can use these features with nothing else than UBIFS?

>  UBIfs (on top of UBI on top of MTD) "materializes" a file system.
>  It contains ordinary Linux/Unix files on a perfect storage medium.
>  It depends upon the perfect storage provided by UBI.

I have the impression that we took a shortcut between the last two
paragraphs. Can you please elaborate on why i need a second UBI
partition within an UBI partition in order to use UBIFS? Or am I wrong
with this point?


Regards,
Thilo

-- 
Dipl.-Ing (FH) Thilo Fromm, MSc., Embedded Systems Architect
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, D-10319 Berlin, Germany
Tel: +49 (30) 515 932 228   mailto:fromm at dresearch-fe.de
Fax: +49 (30) 515 932 77    http://www.dresearch.de
Amtsgericht: Berlin Charlottenburg, HRB 130120 B
Ust.-IDNr. DE273952058
Geschäftsführer: Dr. M. Weber, W. Mögle



More information about the linux-mtd mailing list