[PATCH v2 0/3] Free space fixup on first mount

Matthew L. Creech mlcreech at gmail.com
Wed May 4 18:11:54 EDT 2011


Hi,

The following changes add a superblock option to UBIFS indicating that
it needs to be scanned for LEBs with empty pages the first time it's
mounted.  This is needed because images programmed using "nandwrite"
may contain empty pages, which UBIFS intends to be erased but which
may be programmed as real data.  This causes problems on some NAND
flashes, as described here:

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

When this flag is set, the FS is scanned for any in-use LEBs with one
or more free pages, and these LEBs are remapped (which erases the
blank pages).


Changes since v1: implemented Artem's suggestions:
- Renamed "LEB fixup" to "Free space fixup" for clarity
- Remap LEBs with free space regardless of flags/type
- Unmap completely free/empty (but currently taken) LEBs

-- 
Matthew L. Creech



More information about the linux-mtd mailing list