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

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


Update of /home/cvs/mtd/fs/jffs3
In directory phoenix.infradead.org:/tmp/cvs-serv22028

Modified Files:
	JFFS3design.tex 
Log Message:
Update.


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 @@
 %
 % ABSTRACT
 %
-\thispagestyle{empty}
+\pagestyle{empty}
 \begin{abstract}
 This document discusses different JFFS3 design aspects.
 Additionally, this document tries to define standard JFFS3 dicitionary and terms.
 \end{abstract}
 
 %
-% COPYRIGHT
+% TABLE OF CONTENTS
 %
-\thispagestyle{empty}
-\section*{License}
-TODO: insert GNU's one
+\tableofcontents
+\newpage
+
+\pagestyle{plain}
+\pagenumbering{arabic}
 
 %
 % ABBREVIATIONS
 %
-\section*{Abbreviations}
+\section{Abbreviations}
 \begin{longtable}{p{3cm}p{11cm}}
 \large \textbf{Abbrev.} & \large \textbf{Definition} \\[7pt]
 
@@ -56,7 +58,7 @@
 %
 % DEFINITIONS
 %
-\section*{Definitions}
+\section{Definitions}
 
 \begin{longtable}{p{3cm}p{11cm}}
 
@@ -113,21 +115,29 @@
 &
 Each JFFS3 directory entry is represented by the direntry node.
 Direntry nodes are \texttt{struct jffs3\_raw\_dirent} objects.
+\\[4pt]
 
-\end{longtable}
-\newpage
+\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.
+\\[4pt]
 
-%
-% TABLE OF CONTENTS
-%
-\thispagestyle{empty}
-\tableofcontents
-\newpage
+\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.
+
+\end{longtable}
 
 %
 % CHECK SUMMS
 %
-\pagenumbering{arabic}
 \section{Checksums}
 JFFS3 protects nodes by checksums.
 In order to be able to work with different node sections (common header,
@@ -159,7 +169,8 @@
 reboots.
 
 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}
+\label{ref_sec_unclean_reboot}
+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.
 
+%
+% MISCELLANIOUS
+%
 \section{Miscellanious}
 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 @@
 \href{http://lists.infradead.org/pipermail/linux-mtd/2005-January/011640.html}
 {http://lists.infradead.org/pipermail/linux-mtd/2005-January/011640.html}
 
+\item Have the end majic bitmask on all note types in order to be able
+to quickly detect the partially written nodes.\\
+\href{http://lists.infradead.org/pipermail/linux-mtd/2005-January/011529.html}
+{http://lists.infradead.org/pipermail/linux-mtd/2005-January/011529.html}
+
 \end{enumerate}
 
 %





More information about the linux-mtd-cvs mailing list