[Yaffs] Power down during erase

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Sebastian Huber
Date:  
To: yaffs
Subject: [Yaffs] Power down during erase
Hello,

from the JFFS2 documentation I have this:

http://sourceware.org/jffs2/jffs2-html/node3.html

"The original JFFS simply assumed that any block which appeared at first scan
to contain 0xFF in every byte was free, and would select the longest run of
apparently free space at mount time to be the space between the head and tail
of the log. Unfortunately, extensive power fail testing on JFFS proved this to
be unwise. For many types of flash chips, if power is lost during an erase
operation, some bits may be left in an unstable state, while most are reset to
a logical one. If the initial scan happens to read all ones and treat a block
containing such unstable bits as usable, then data may be lost -- and such data
loss may not even be avoidable by the naïve method of verification by reading
back data immediately by writing, because the bit may just happen to return the
correct value when read back for verification.

Empirical results showed that even rereading the entire contents of the block
multiple times in an attempt to detect unstable bits was not sufficiently
reliable to avoid data loss, so an alternative approach was required. The
accepted solution was to write the marker node to the flash block immediately
after successful completion of an erase operation. Upon encountering flash
blocks which do not appear to contain any valid nodes, JFFS2 will trigger an
erase operation and subsequently write the appropriate marker node to the
erased block."

Has YAFFS2 a similar mechanism to prevent usage of blocks which had a power
down during an erase operation?

Best regards,
    Sebastian


--
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : 
PGP     : Public key available on request.


Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.