mtd/fs/jffs3 JFFS3design.tex,1.43,1.44

Artem Bityuckiy dedekind at infradead.org
Sat Apr 23 10:48:55 EDT 2005


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

Modified Files:
	JFFS3design.tex 
Log Message:
Update DCP chapter.

Index: JFFS3design.tex
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/JFFS3design.tex,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- JFFS3design.tex	23 Apr 2005 12:33:49 -0000	1.43
+++ JFFS3design.tex	23 Apr 2005 14:48:51 -0000	1.44
@@ -360,12 +360,12 @@
 
 The data structure corresponding to DCP is:
 \begin{verbatim}
-struct jffs3_data_checkpoint
+struct jffs3_raw_data_checkpoint
 {
   uint16_t magic;   /* Magic bitmask of DCP node. */
   uint16_t index;   /* The DCP index. Gives DCP range offset
                        if multiplied by the DCP range. */
-  uint32_t version; /* Helps to differentiate between valid
+  uint64_t version; /* Helps to differentiate between valid
                        and obsolete data checkpoints. */
   uint32_t hdr_crc; /* DCP Header CRC32 checksum. */
   uint32_t crc;     /* DCP CRC32 checksum. */
@@ -376,7 +376,7 @@
   struct jffs3_dcp_entry entries[];
 } __attribute__((packed));
 
-struct jffs3_dcp_entry
+struct jffs3_raw_dcp_entry
 {
   uint32_t phys_offs; /* The position of the node on Flash. */
   uint32_t offs;      /* Offset of the data range the node refers. */
@@ -406,15 +406,15 @@
 neither too large nor too small. To facilitate faster DCP update on NAND
 flashes the maximum DCP node physical size $S_{DCP}$ should be one NAND
 page.
-One DCP entry takes 10 bytes, the DCP node header takes 16 bytes and it is
+One DCP entry takes 10 bytes, the DCP node header takes 20 bytes and it is
 easy to calculate the maximum number DCP entries $E_{DCP}$:
 \begin{center}
 \begin{tabular}{ll}
 \textbf{NAND page size} & $\bf E_{DCP}$ \\
 \hline
 512 bytes  & 49\\
-2048 bytes & 203\\
-4096 bytes & 408\\
+2048 bytes & 202\\
+4096 bytes & 407\\
 \end{tabular}
 \end{center}
 
@@ -422,7 +422,7 @@
 able to write non-pristine nodes, i.e., nodes of size <
 \texttt{PAGE\_SIZE}. In order to allow filling the DCP range by
 non-pristine nodes the following should be true:
-$$R_{DCP} > \tt{PAGE_SIZE}{\cdot}E_{DCP},$$,
+$$R_{DCP} > \mathtt{PAGE\_SIZE}{\cdot}E_{DCP},$$
 where $E_{DCP}$ is the
 maximal number of DCP entries in DCP. The table below illustrates
 the average data node range size depending on $R$ and NAND page size.
@@ -442,7 +442,7 @@
 \begin{tabular}{ll}
 $\bf R_{DCP}$ & \textbf{Average $\bf R_{data}$}\\
 \hline
-128 KiB & 645 bytes\\
+128 KiB & 650 bytes\\
 256 KiB & 1.3 KiB\\
 512 KiB & 2.6 KiB\\
 \end{tabular}
@@ -462,8 +462,8 @@
 The above tables assume each DCP entry may at most refer 4~KiB of data.
 Thus we guarantee that DCP node won't be larger then one NAND page.
 
-For NOR and other non-paged flashes JFFS3 just assumes some that
-the flash page size is 512 bytes or larger, depending on the
+For NOR and other non-paged flashes JFFS3 just assumes that
+the flash page size is virtually 512 bytes or larger, depending on the
 flash size.
 \end{description}
 
@@ -486,10 +486,9 @@
 The above table also shows the amount of Flash space required to store
 DCP nodes (assuming each DCP entry takes the whole Flash page).
 
-
 To relax RAM usage JFFS3 makes use of \emph{second level data
 checkpoints} (DCP2) referring
-the level one data checkpoints of the file similerly to how DCP refers
+the level one data checkpoints of the file similarly to how DCP refers
 data nodes. The following requirements are to be met for DCP2:
 
 \begin{itemize}
@@ -500,16 +499,21 @@
 
 With DCP2 the above table looks as:
 \begin{center}
-\begin{tabular}{llll}
+\begin{tabular}{lllll}
 \textbf{File size} & \textbf{NAND Page size} &
-$\bf R_{DCP}$ & \textbf{RAM required}\\
+$\bf R_{DCP}$ & $\bf R_{DCP2}$
+& \textbf{RAM required}\\
 \hline
-64 MiB  & 512 bytes  & 256 KiB & 44 bytes\\
-1 GiB   & 2048 bytes & 1 MiB   & 44 bytes\\
-8 GiB   & 4096 bytes & 2 MiB   & 84 bytes\\
+64 MiB  & 512 bytes  & 256 KiB & 8 MiB   & 32 bytes\\
+1 GiB   & 2048 bytes & 1 MiB   & 128 MiB & 32 bytes\\
+8 GiB   & 4096 bytes & 2 MiB   & 512 MiB & 64 bytes\\
 \end{tabular}
 \end{center}
 
+Besides $R_{DCP2}$ JFFS3 defines one more constant $R_{DCP2}^{min}$
+denoting the minimal size of file which can have an
+associated DCP2 node.
+
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %





More information about the linux-mtd-cvs mailing list