mtd/fs/jffs3 JFFS3design.tex,1.38,1.39

Artem Bityuckiy dedekind at infradead.org
Wed Apr 20 10:23:54 EDT 2005


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

Modified Files:
	JFFS3design.tex 
Log Message:
Add CP chapter.


Index: JFFS3design.tex
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/JFFS3design.tex,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- JFFS3design.tex	19 Apr 2005 15:51:40 -0000	1.38
+++ JFFS3design.tex	20 Apr 2005 14:23:51 -0000	1.39
@@ -234,7 +234,7 @@
 
 Thus, there are following mount problems in JFFS2:
 \begin{description}
-\item[Slow mount] To mount the file system JFFS2 scans the whole partition in
+\item[Slow mount.] To mount the file system JFFS2 scans the whole partition in
 order to recognize nodes, build \mbox{per-block} and \mbox{per-inode} nodes lists, etc.
 \item[Unpleasant checking.] Just after mount JFFS2 checks all the
 inodes which results in flash \mbox{re-reading}, eats a lot of CPU cycles and may block
@@ -287,6 +287,11 @@
 time, memory consumption and inode build time are liner functions of the
 amount of the stored data.
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% JFFS3 GOALS AND REQUIREMENTS
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{JFFS3 goals and requirements}
 The following is somewhat unstructured list of JFFS2 goals and requirements.
 
@@ -309,6 +314,73 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
+% CHECKPOINTS
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Checkpoints}
+A checkpoint (CP) is new node type which serves to accumulate all
+information about an inode which is required to efficiently read and
+write to files create/remove direntries in directories. The following
+types of checkpoints are defined:
+
+\begin{itemize}
+\item data checkpoints which are associated with regular files;
+\item directory checkpoints which are associated with directories;
+\end{itemize}
+
+%
+% Data checkpoints
+%
+\subsection{Data checkpoints}
+Data checkpoints (DCP):
+\begin{itemize}
+\item are associated with regular files;
+\item refer all the valid nodes of a regular file inode;
+\item allow not to keep in-core references to all the inode data nodes,
+but only references to the inode data checkpoints;
+\item play the role of JFFS2 fragtrees, i.e., allow to quickly locate
+positions of data nodes for any given file data range.
+\end{itemize}
+
+Each regular file inode is associated with one or more data
+checkpoints. Each DCP corresponds to a fixed inode data range of size $R$.
+I.e., if the size of the regular file is $< R$, it has
+only one associated DCP node. If the size of the file is $> {R}$ but
+$< {2R}$ then there will be two associated DCP and so forth.
+Obviously, $R$ value is multiple of \texttt{PAGE\_SIZE}.
+
+Each DCP node carries the following information:
+\begin{itemize} 
+\item index $I$
+which defines the DCP range (the file range described by DCP is
+${\lbrack}I{\cdot}R, I{\cdot}(R + 1)\rbrack$);
+
+\item version, in order to distinguish valid and obsolete DCP
+nodes;
+
+\item the list of data nodes belonging to the DCP range; the list is
+sorted by the data node offsets, i.e., is effectively the fragtree of
+the DCP range.
+\end{itemize}
+
+The above mentioned list is essentially an array of objects, containing
+the following:
+\begin{itemize}
+\item the data node range;
+\item the data node physical address of Flash.
+\end{itemize}
+
+Thus, larger files have more associated DCP nodes. It stands for reason
+that when file is changed or GC moves any node of the file, the
+corresponding DCP node becomes obsolete and ought to be rewritten. But
+only those data checkpoints are rewritten that correspond to the changed
+file range.
+
+With the help of DCP JFFS3 need only keep in-core an array (or more
+precisely, a list of arrays) of DCP node references of files.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
 % CHECKSUM
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





More information about the linux-mtd-cvs mailing list