[PATCH 1/1] Blockrom: badblock-free RO MTD blockdev access

Thilo Fromm fromm at dresearch-fe.de
Mon May 7 05:57:26 EDT 2012


Hello *.*,

On 7 May 2012 10:39, Thilo Fromm <github at thilo-fromm.de> wrote:
>        The blockrom MTD driver provides bad block free read access to MTDs via
>        /dev/blockromX device files. Bad blocks are automatically skipped upon read,
>        and reading continues with the next good block.
>
>        This allows for read-only filesystems to exist in MTDs with bad blocks:
>        usually the baddies are skipped when writing the filesystem into MTD by
>        the tool performing the write (e.g. nandwrite). To successfully mount
>        these filesystems, however, you will need a translation layer that skips
>        bad blocks upon read as well. blockrom is such a translation layer.
>

Some remarks:
- moved bad block mapping table generation to driver initialisation time.
  Further optimization opportunities include e.g. doing table generation
  in the background (work queue or kernel task).
  The original driver did lazy block mapping, i.e. mapped when a block
  was accessed for the first time.
- driver handle already has "spare blocks" and "management blocks" fields
  which are currently unused but provide for addiition of a very simple
  scrubbing mechanism later on.

I understand that the main focus of the linux-mtd community is on
ubi_blk for generic r/w block access, one layer above MTD. I provide
this FTL for simple bad block-free r/o access directly on the MTD
level in the hope that it is useful for generic read-only FS. Comments
and suggestions are welcome.

I'm willing to put extra effort into blockrom should the linux-mtd
community be interested into a merge despite of ubi_blk.

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