[PATCH]Add erase count tracking support in JFFS2
zhao forrest
zhao_fusheng at hotmail.com
Thu Aug 25 03:44:37 EDT 2005
Hi,
I refine the code again according to Joern's comments.
Here is an explanation of implementation details.
A new node type JFFS2_NODETYPE_ERASE_COUNT is introduced to store
the erase count of each erase block. So JFFS2_NODETYPE_ERASE_COUNT
is like JFFS2_NODETYPE_CLEANMARKER and is a per-erase-block node.
For NOR flash, JFFS2_NODETYPE_ERASE_COUNT tightly follow the
JFFS2_NODETYPE_CLEANMARKER; for NAND flash, JFFS2_NODETYPE_ERASE
_COUNT is stored in the OOB area of second page.
*How to work?
[FS mounting]
During JFFS2 mounting, the erase count is read out from
JFFS2_NODETYPE_ERASE_COUNT and is stored in the new field
"erase_count" of struct jffs2_eraseblock.
[erase the block]
Each time the erasing operation of an erase block complete,
increase "erase_count" of struct jffs2_eraseblock. Then write
JFFS2_NODETYPE_ERASE_COUNT to erase block after JFFS2_NODETYPE_
CLEANMARKER has been written.
Thanks,
Forrest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erase_count_r2.patch
Type: application/octet-stream
Size: 19822 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20050825/92f861c9/attachment.obj
More information about the linux-mtd
mailing list