Problem with clean markers/partial writes on Micron 4-bit ECC NAND

Kevin Cernekee cernekee at gmail.com
Sat Jun 18 13:49:52 EDT 2011


On Sat, Jun 18, 2011 at 9:37 AM, Peter Barada <peter.barada at gmail.com> wrote:
> The issue I have is how can I best tell MTD (and FS layers on top of it)
> that some of the OOB bytes can not be used in partial writes due to those
> bytes perturbing the ECC, or how to change JFFS2 to erase the block after
> writing the cleanmarker when it wants to write data into the block.

FWIW, the product I work on used to utilize JFFS2 and YAFFS2.  We
needed to hack around many of the same OOB/NOP limitations you are
seeing.  (As well as several cases where corrupted filesystem metadata
caused a kernel oops on mount.)

Once UBIFS became a viable alternative, we found that supporting
JFFS2/YAFFS2 on NAND flash was far more trouble than it was worth.

> Why does JFFS2 write a clean marker into the empty block?  Is it to cover
> some state transition where power could be interrupted?

Here is a good explanation:

http://linux-mtd.infradead.org/faq/jffs2.html#L_clmarker



More information about the linux-mtd mailing list