aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/jffs2.h21
-rw-r--r--include/linux/jffs2_fs_sb.h4
2 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index a66d0a8b70e4..acb51a3669a2 100644
--- a/include/linux/jffs2.h
+++ b/include/linux/jffs2.h
@@ -8,7 +8,7 @@
8 * For licensing information, see the file 'LICENCE' in the 8 * For licensing information, see the file 'LICENCE' in the
9 * jffs2 directory. 9 * jffs2 directory.
10 * 10 *
11 * $Id: jffs2.h,v 1.36 2005/07/26 13:19:36 havasi Exp $ 11 * $Id: jffs2.h,v 1.37 2005/09/07 08:34:55 havasi Exp $
12 * 12 *
13 */ 13 */
14 14
@@ -28,6 +28,9 @@
28#define JFFS2_EMPTY_BITMASK 0xffff 28#define JFFS2_EMPTY_BITMASK 0xffff
29#define JFFS2_DIRTY_BITMASK 0x0000 29#define JFFS2_DIRTY_BITMASK 0x0000
30 30
31/* Summary node MAGIC marker */
32#define JFFS2_SUM_MAGIC 0x02851885
33
31/* We only allow a single char for length, and 0xFF is empty flash so 34/* We only allow a single char for length, and 0xFF is empty flash so
32 we don't want it confused with a real length. Hence max 254. 35 we don't want it confused with a real length. Hence max 254.
33*/ 36*/
@@ -60,6 +63,8 @@
60#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) 63#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
61#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4) 64#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4)
62 65
66#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)
67
63// Maybe later... 68// Maybe later...
64//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) 69//#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
65//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) 70//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4)
@@ -146,10 +151,24 @@ struct jffs2_raw_inode
146 uint8_t data[0]; 151 uint8_t data[0];
147} __attribute__((packed)); 152} __attribute__((packed));
148 153
154struct jffs2_summary_node{
155 jint16_t magic;
156 jint16_t nodetype; /* = JFFS2_NODETYPE_INODE_SUM */
157 jint32_t totlen;
158 jint32_t hdr_crc;
159 jint32_t sum_num; /* number of sum entries*/
160 jint32_t cln_mkr; /* clean marker size, 0 = no cleanmarker */
161 jint32_t padded; /* sum of the size of padding nodes */
162 jint32_t sum_crc; /* summary information crc */
163 jint32_t node_crc; /* node crc */
164 jint32_t sum[0]; /* inode summary info */
165} __attribute__((packed));
166
149union jffs2_node_union { 167union jffs2_node_union {
150 struct jffs2_raw_inode i; 168 struct jffs2_raw_inode i;
151 struct jffs2_raw_dirent d; 169 struct jffs2_raw_dirent d;
152 struct jffs2_unknown_node u; 170 struct jffs2_unknown_node u;
171 struct jffs2_summary_node s;
153}; 172};
154 173
155#endif /* __LINUX_JFFS2_H__ */ 174#endif /* __LINUX_JFFS2_H__ */
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h
index 1e21546622de..5087612ed9ac 100644
--- a/include/linux/jffs2_fs_sb.h
+++ b/include/linux/jffs2_fs_sb.h
@@ -1,4 +1,4 @@
1/* $Id: jffs2_fs_sb.h,v 1.52 2005/05/19 16:12:17 gleixner Exp $ */ 1/* $Id: jffs2_fs_sb.h,v 1.53 2005/09/07 08:34:56 havasi Exp $ */
2 2
3#ifndef _JFFS2_FS_SB 3#ifndef _JFFS2_FS_SB
4#define _JFFS2_FS_SB 4#define _JFFS2_FS_SB
@@ -112,6 +112,8 @@ struct jffs2_sb_info {
112 uint32_t fsdata_len; 112 uint32_t fsdata_len;
113#endif 113#endif
114 114
115 struct jffs2_summary *summary; /* Summary information */
116
115 /* OS-private pointer for getting back to master superblock info */ 117 /* OS-private pointer for getting back to master superblock info */
116 void *os_priv; 118 void *os_priv;
117}; 119};