mtd/fs/jffs3 JFFS3design.tex,1.6,1.7

Artem Bityuckiy dedekind at
Mon Jan 24 06:41:36 EST 2005

Update of /home/cvs/mtd/fs/jffs3
In directory

Modified Files:
Log Message:

Index: JFFS3design.tex
RCS file: /home/cvs/mtd/fs/jffs3/JFFS3design.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JFFS3design.tex	23 Jan 2005 17:22:04 -0000	1.6
+++ JFFS3design.tex	24 Jan 2005 11:41:33 -0000	1.7
@@ -23,23 +23,25 @@
 This document discusses different JFFS3 design aspects.
 Additionally, this document tries to define standard JFFS3 dicitionary and terms.
-TODO: insert GNU's one
 \large \textbf{Abbrev.} & \large \textbf{Definition} \\[7pt]
@@ -56,7 +58,7 @@
@@ -113,21 +115,29 @@
 Each JFFS3 directory entry is represented by the direntry node.
 Direntry nodes are \texttt{struct jffs3\_raw\_dirent} objects.
+\raggedright \emph{Summary node}
+Summary node is special node type which describes the layout of
+not-empty eblocks. Summary blocks are situated at the end of each eblock
+(which contain some data) and describe the position, type, length and
+some other parameters of all the eblock's nodes. Summary nodes are
+\texttt{struct jffs3\_raw\_summary} objects.
+\raggedright \emph{Summary end magic bitmask}
+Summary nodes has special
+magic bitmask at theirs end which helps to quickly detect whether the
+summary node present or not in the given eblock by reading the last few
+eblock's bytes.
 JFFS3 protects nodes by checksums.
 In order to be able to work with different node sections (common header,
@@ -159,7 +169,8 @@
 In general, in JFFS3 checksums are not intended (but still may be used) to detect
-errors cased by unclean reboots. There is another mechanism exists for this purpose. 
+errors cased by unclean reboots. There is another mechanism exists for
+this purpose (see section \ref{ref_sec_unclean_reboot}). 
 % Checksum modes
@@ -187,6 +198,23 @@
 compilation time.
+% Unclean reboot errors detection
+\subsection{Unclean reboot errors detection}
+The primary mechanism of the unclean reboot detection is the absence of
+summary node. If an eblock contains summary, and the summary itself has
+no errors, the eblock does not contain partially written nodes.
+The corerectness of summary nodes may be checked by either checking its
+checksum or by checking its end magic bitmask (if the media corruption
+errors are not being interested).
+If there is no summary node in an eblock, the last node in this eblock
+should be checkd (using checksum) since it is possible that it was
+not fully written.
 % Checksum algorithm
 \subsection{Checksum algorithm}
@@ -215,6 +243,9 @@
 \subsubsection*{JFFS2 correspondence}
 JFFS2 uses the CRC32 algoritm with the start seed 0.
 This subsection contains the gathered list of different ideas and thoughts,
 suggested by different people but have not yet highlited/used in this
@@ -242,6 +273,11 @@
+\item Have the end majic bitmask on all note types in order to be able
+to quickly detect the partially written nodes.\\

More information about the linux-mtd-cvs mailing list