mtd/fs/jffs3 gc.c,3.10,3.11 summary.c,3.6,3.7 wbuf.c,3.9,3.10

havasi at infradead.org havasi at infradead.org
Fri Jan 21 05:55:45 EST 2005


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

Modified Files:
	gc.c summary.c wbuf.c 
Log Message:

- two NOR specific summary fix
- a new kConfig option. if the user sets it the system will not check
  the CRC of the summarized nodes. (marked as DANGEROUS)



Index: gc.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/gc.c,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -r3.10 -r3.11
--- gc.c	5 Jan 2005 16:19:00 -0000	3.10
+++ gc.c	21 Jan 2005 10:55:42 -0000	3.11
@@ -503,6 +503,7 @@
 	uint32_t phys_ofs, alloclen;
 	uint32_t crc, rawlen;
 	int retried = 0;
+	struct kvec vecs[1];
 
 	DBG_GC(1, "Going to GC REF_PRISTINE node at %#08x\n", ref_offset(raw));
 
@@ -594,7 +595,10 @@
 #endif
 	nraw->next_phys = NULL;
 
-	ret = jffs3_flash_write(c, phys_ofs, rawlen, &retlen, (char *)node);
+	vecs[0].iov_base = (unsigned char *) node;
+	vecs[0].iov_len = rawlen;
+
+	ret = jffs3_flash_writev(c, vecs, 1, phys_ofs, &retlen, 0);
 
 	if (ret || (retlen != rawlen)) {
 		WARNING_MSG("Write of %d bytes at %#08x failed. returned %d, retlen %zd\n",

Index: summary.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/summary.c,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -r3.6 -r3.7
--- summary.c	7 Jan 2005 08:54:00 -0000	3.6
+++ summary.c	21 Jan 2005 10:55:42 -0000	3.7
@@ -424,7 +424,13 @@
 						}
 					}
 
-					raw->flash_offset = (jeb->offset + je32_to_cpu(spi->offset)) | REF_UNCHECKED;
+					raw->flash_offset = (jeb->offset + je32_to_cpu(spi->offset)) | 
+				#ifdef CONFIG_JFFS3_SUMMARY_NOCRCCHECK
+					REF_NORMAL; 
+				#else
+					REF_UNCHECKED;
+				#endif
+
 #ifdef TMP_TOTLEN
 					raw->__totlen = PAD(je32_to_cpu(spi->totlen));
 #endif
@@ -439,8 +445,12 @@
 					jeb->last_node = raw;
 
 					*pseudo_random += je32_to_cpu(spi->version);
+				#ifdef CONFIG_JFFS3_SUMMARY_NOCRCCHECK
+					USED_SPACE(PAD(je32_to_cpu(spi->totlen)));
+				#else
 					UNCHECKED_SPACE(PAD(je32_to_cpu(spi->totlen)));
-
+				#endif
+					
 					temp8ptr = (uint8_t *) sp;
 					temp8ptr += JFFS3_SUMMARY_INODE_SIZE;
 					sp = (struct jffs3_sum_unknown_flash *) temp8ptr;

Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/wbuf.c,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -r3.9 -r3.10
--- wbuf.c	5 Jan 2005 16:19:01 -0000	3.9
+++ wbuf.c	21 Jan 2005 10:55:42 -0000	3.10
@@ -585,12 +585,6 @@
 
 	/* If not NAND flash, don't bother */
 	if (!c->wbuf){
-#ifdef CONFIG_JFFS3_SUMMARY
-		DBG_SUMMARY(1,"NOT NAND MEMORY\n");
-		if(jffs3_sum_add_kvec(c,invecs,count,(uint32_t) to)){
-			ERROR_MSG("Can't allocate memory\n");
-		}
-#endif
 		return jffs3_flash_direct_writev(c, invecs, count, to, retlen);
 	}
 





More information about the linux-mtd-cvs mailing list