[PATCH] Obsolete nodes that are unlinked when possible

Ferenc Havasi havasi at inf.u-szeged.hu
Mon Mar 19 06:55:41 EDT 2007


Joakim Tjernlund írta:
> Would bad things happen if an unclean reboot happens or will
> you just loose some performance?
>   
There were many reason to set jffs2_can_mark_obsolete(c) to 0.

As Artem wrote if we would like to enable we have to mark not only the 
node as obsolete but also the summary entry.

It is not too easy because of the followings:
- If you would like to modify the summary node on the flash it breaks 
the CRC of the summary node. A solutions can be: the ACCURATE bit should 
not included in the CRC. An other (worse) solution can be: when we 
obsolate a node we overwrite the summary magic with 0, and at the next 
mount the system will scan the erase block instead of using the summary 
(peformance penalty).
- We also have to take care about not only the already written out 
summary. The summary is written out when the jffs2 close an erase block. 
If you want to mark obsolete a node in the unclosed eraseblock 
(nextblock) you should obsolate it in the collected summary, too. 
However it is not a big task, but also needs code modification and testing.

Ferenc





More information about the linux-mtd mailing list