aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerenc Havasi <havasi@inf.u-szeged.hu>2005-09-26 07:37:25 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 16:32:45 -0500
commit2bc9764c4837c6b7da540b7a2592ec02f9a14e47 (patch)
tree9171bc9f8e36e7407c5f822c08fccdc2e45df050
parentef6f0d1ffcd86484e01cec4fd2d2c5ca5887a43b (diff)
[JFFS2] Rename jffs2_summary_node to jffs2_raw_summary
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--fs/jffs2/summary.c14
-rw-r--r--fs/jffs2/summary.h4
-rw-r--r--include/linux/jffs2.h12
3 files changed, 16 insertions, 14 deletions
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index 1ebc81e4477d..308251266c6c 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -8,7 +8,7 @@
8 * 8 *
9 * For licensing information, see the file 'LICENCE' in this directory. 9 * For licensing information, see the file 'LICENCE' in this directory.
10 * 10 *
11 * $Id: summary.c,v 1.3 2005/09/21 14:43:07 dedekind Exp $ 11 * $Id: summary.c,v 1.4 2005/09/26 11:37:21 havasi Exp $
12 * 12 *
13 */ 13 */
14 14
@@ -292,7 +292,7 @@ no_mem:
292/* Process the stored summary information - helper function for jffs2_sum_scan_sumnode() */ 292/* Process the stored summary information - helper function for jffs2_sum_scan_sumnode() */
293 293
294static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, 294static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
295 struct jffs2_summary_node *summary, uint32_t *pseudo_random) 295 struct jffs2_raw_summary *summary, uint32_t *pseudo_random)
296{ 296{
297 struct jffs2_raw_node_ref *raw; 297 struct jffs2_raw_node_ref *raw;
298 struct jffs2_inode_cache *ic; 298 struct jffs2_inode_cache *ic;
@@ -428,7 +428,7 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
428{ 428{
429 struct jffs2_unknown_node crcnode; 429 struct jffs2_unknown_node crcnode;
430 struct jffs2_raw_node_ref *cache_ref; 430 struct jffs2_raw_node_ref *cache_ref;
431 struct jffs2_summary_node *summary; 431 struct jffs2_raw_summary *summary;
432 int ret, sumsize; 432 int ret, sumsize;
433 uint32_t crc; 433 uint32_t crc;
434 434
@@ -468,14 +468,14 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
468 goto crc_err; 468 goto crc_err;
469 } 469 }
470 470
471 crc = crc32(0, summary, sizeof(struct jffs2_summary_node)-8); 471 crc = crc32(0, summary, sizeof(struct jffs2_raw_summary)-8);
472 472
473 if (je32_to_cpu(summary->node_crc) != crc) { 473 if (je32_to_cpu(summary->node_crc) != crc) {
474 dbg_summary("Summary node is corrupt (bad CRC)\n"); 474 dbg_summary("Summary node is corrupt (bad CRC)\n");
475 goto crc_err; 475 goto crc_err;
476 } 476 }
477 477
478 crc = crc32(0, summary->sum, sumsize - sizeof(struct jffs2_summary_node)); 478 crc = crc32(0, summary->sum, sumsize - sizeof(struct jffs2_raw_summary));
479 479
480 if (je32_to_cpu(summary->sum_crc) != crc) { 480 if (je32_to_cpu(summary->sum_crc) != crc) {
481 dbg_summary("Summary node data is corrupt (bad CRC)\n"); 481 dbg_summary("Summary node data is corrupt (bad CRC)\n");
@@ -560,7 +560,7 @@ crc_err:
560static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, 560static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
561 uint32_t infosize, uint32_t datasize, int padsize) 561 uint32_t infosize, uint32_t datasize, int padsize)
562{ 562{
563 struct jffs2_summary_node isum; 563 struct jffs2_raw_summary isum;
564 union jffs2_sum_mem *temp; 564 union jffs2_sum_mem *temp;
565 struct jffs2_sum_marker *sm; 565 struct jffs2_sum_marker *sm;
566 struct kvec vecs[2]; 566 struct kvec vecs[2];
@@ -685,7 +685,7 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c)
685 } 685 }
686 686
687 datasize = c->summary->sum_size + sizeof(struct jffs2_sum_marker); 687 datasize = c->summary->sum_size + sizeof(struct jffs2_sum_marker);
688 infosize = sizeof(struct jffs2_summary_node) + datasize; 688 infosize = sizeof(struct jffs2_raw_summary) + datasize;
689 padsize = jeb->free_size - infosize; 689 padsize = jeb->free_size - infosize;
690 infosize += padsize; 690 infosize += padsize;
691 datasize += padsize; 691 datasize += padsize;
diff --git a/fs/jffs2/summary.h b/fs/jffs2/summary.h
index e6b0a69acbd4..b7a678be1709 100644
--- a/fs/jffs2/summary.h
+++ b/fs/jffs2/summary.h
@@ -8,7 +8,7 @@
8 * 8 *
9 * For licensing information, see the file 'LICENCE' in this directory. 9 * For licensing information, see the file 'LICENCE' in this directory.
10 * 10 *
11 * $Id: summary.h,v 1.1 2005/09/07 08:34:54 havasi Exp $ 11 * $Id: summary.h,v 1.2 2005/09/26 11:37:21 havasi Exp $
12 * 12 *
13 */ 13 */
14 14
@@ -142,7 +142,7 @@ struct jffs2_sum_marker
142 jint32_t magic; /* == JFFS2_SUM_MAGIC */ 142 jint32_t magic; /* == JFFS2_SUM_MAGIC */
143}; 143};
144 144
145#define JFFS2_SUMMARY_FRAME_SIZE (sizeof(struct jffs2_summary_node) + sizeof(struct jffs2_sum_marker)) 145#define JFFS2_SUMMARY_FRAME_SIZE (sizeof(struct jffs2_raw_summary) + sizeof(struct jffs2_sum_marker))
146 146
147#ifdef CONFIG_JFFS2_SUMMARY /* SUMMARY SUPPORT ENABLED */ 147#ifdef CONFIG_JFFS2_SUMMARY /* SUMMARY SUPPORT ENABLED */
148 148
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h
index acb51a3669a2..2788880368c4 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.37 2005/09/07 08:34:55 havasi Exp $ 11 * $Id: jffs2.h,v 1.38 2005/09/26 11:37:23 havasi Exp $
12 * 12 *
13 */ 13 */
14 14
@@ -151,9 +151,10 @@ struct jffs2_raw_inode
151 uint8_t data[0]; 151 uint8_t data[0];
152} __attribute__((packed)); 152} __attribute__((packed));
153 153
154struct jffs2_summary_node{ 154struct jffs2_raw_summary
155{
155 jint16_t magic; 156 jint16_t magic;
156 jint16_t nodetype; /* = JFFS2_NODETYPE_INODE_SUM */ 157 jint16_t nodetype; /* = JFFS2_NODETYPE_SUMMARY */
157 jint32_t totlen; 158 jint32_t totlen;
158 jint32_t hdr_crc; 159 jint32_t hdr_crc;
159 jint32_t sum_num; /* number of sum entries*/ 160 jint32_t sum_num; /* number of sum entries*/
@@ -164,11 +165,12 @@ struct jffs2_summary_node{
164 jint32_t sum[0]; /* inode summary info */ 165 jint32_t sum[0]; /* inode summary info */
165} __attribute__((packed)); 166} __attribute__((packed));
166 167
167union jffs2_node_union { 168union jffs2_node_union
169{
168 struct jffs2_raw_inode i; 170 struct jffs2_raw_inode i;
169 struct jffs2_raw_dirent d; 171 struct jffs2_raw_dirent d;
172 struct jffs2_raw_summary s;
170 struct jffs2_unknown_node u; 173 struct jffs2_unknown_node u;
171 struct jffs2_summary_node s;
172}; 174};
173 175
174#endif /* __LINUX_JFFS2_H__ */ 176#endif /* __LINUX_JFFS2_H__ */