mtd/fs/jffs3 Makefile.24, 3.1, 3.2 Makefile.common, 3.3, 3.4 defconfig, 3.2, 3.3 fs.c, 3.8, 3.9 jffs3.h, 3.6, 3.7 nodelist.h, 3.11, 3.12 os-linux.h, 3.4, 3.5 scan.c, 3.12, 3.13 super-v24.c, 3.5, 3.6 super.c, 3.9, 3.10 wbuf.c, 3.14, 3.15

Andrew Victor pavlov at infradead.org
Wed Feb 9 09:25:18 EST 2005


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

Modified Files:
	Makefile.24 Makefile.common defconfig fs.c jffs3.h nodelist.h 
	os-linux.h scan.c super-v24.c super.c wbuf.c 
Log Message:
This patch replaces the current CONFIG_JFFS2_FS_NAND and
CONFIG_JFFS2_FS_NOR_ECC with a single configuration option - 
CONFIG_JFFS2_FS_WRITEBUFFER.

(This is now the same as in JFFS2)


Signed-off-by: Andrew Victor <andrew at sanpeople.com>



Index: Makefile.24
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/Makefile.24,v
retrieving revision 3.1
retrieving revision 3.2
diff -u -r3.1 -r3.2
--- Makefile.24	9 Dec 2004 16:05:03 -0000	3.1
+++ Makefile.24	9 Feb 2005 14:25:14 -0000	3.2
@@ -30,13 +30,13 @@
 
 LINUX_OBJS += super-v24.o crc32.o rbtree.o
 
-NAND_OBJS-$(CONFIG_JFFS3_FS_NAND) += wbuf.o
+WBUF_OBJS-$(CONFIG_JFFS3_FS_WRITEBUFFER) += wbuf.o
 
 COMPR_OBJS-$(CONFIG_JFFS3_RUBIN)  += compr_rubin.o
 COMPR_OBJS-$(CONFIG_JFFS3_RTIME)  += compr_rtime.o
 COMPR_OBJS-$(CONFIG_JFFS3_ZLIB)   += compr_zlib.o
 
-obj-y := $(COMPR_OBJS-y) $(JFFS3_OBJS) $(LINUX_OBJS) $(NAND_OBJS-y)
+obj-y := $(COMPR_OBJS-y) $(JFFS3_OBJS) $(LINUX_OBJS) $(WBUF_OBJS-y)
 O_TARGET := jffs3.o
 
 include $(TOPDIR)/Rules.make

Index: Makefile.common
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/Makefile.common,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -r3.3 -r3.4
--- Makefile.common	21 Dec 2004 15:18:50 -0000	3.3
+++ Makefile.common	9 Feb 2005 14:25:14 -0000	3.4
@@ -12,8 +12,7 @@
 jffs3-y	+= symlink.o build.o erase.o background.o fs.o writev.o
 jffs3-y	+= super.o debug.o
 
-jffs3-$(CONFIG_JFFS3_FS_NAND)	+= wbuf.o
-jffs3-$(CONFIG_JFFS3_FS_NOR_ECC) += wbuf.o
+jffs3-$(CONFIG_JFFS3_FS_WRITEBUFFER)	+= wbuf.o
 jffs3-$(CONFIG_JFFS3_RUBIN)	+= compr_rubin.o
 jffs3-$(CONFIG_JFFS3_RTIME)	+= compr_rtime.o
 jffs3-$(CONFIG_JFFS3_ZLIB)	+= compr_zlib.o

Index: defconfig
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/defconfig,v
retrieving revision 3.2
retrieving revision 3.3
diff -u -r3.2 -r3.3
--- defconfig	9 Dec 2004 16:09:09 -0000	3.2
+++ defconfig	9 Feb 2005 14:25:14 -0000	3.3
@@ -3,7 +3,7 @@
 
 CONFIG_JFFS3_FS=m
 ifdef NONAND
-CONFIG_JFFS3_FS_NAND=n
+CONFIG_JFFS3_FS_WRITEBUFFER=n
 else
-CONFIG_JFFS3_FS_NAND=y
+CONFIG_JFFS3_FS_WRITEBUFFER=y
 endif

Index: fs.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/fs.c,v
retrieving revision 3.8
retrieving revision 3.9
diff -u -r3.8 -r3.9
--- fs.c	5 Jan 2005 16:19:00 -0000	3.8
+++ fs.c	9 Feb 2005 14:25:14 -0000	3.9
@@ -460,7 +460,7 @@
 
 	c = JFFS3_SB_INFO(sb);
 
-#ifndef CONFIG_JFFS3_FS_NAND
+#ifndef CONFIG_JFFS3_FS_WRITEBUFFER
 	if (c->mtd->type == MTD_NANDFLASH) {
 		ERROR_MSG("Cannot operate on NAND flash unless jffs3 NAND support is compiled in.\n");
 		return -EINVAL;

Index: jffs3.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/jffs3.h,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -r3.6 -r3.7
--- jffs3.h	5 Jan 2005 16:19:00 -0000	3.6
+++ jffs3.h	9 Feb 2005 14:25:14 -0000	3.7
@@ -293,7 +293,7 @@
 	   to an obsoleted node. I don't like this. Alternatives welcomed. */
 	struct semaphore erase_free_sem;
 
-#if defined CONFIG_JFFS3_FS_NAND || defined CONFIG_JFFS3_FS_NOR_ECC
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	/* Write-behind buffer for NAND flash */
 	unsigned char *wbuf;
 	uint32_t wbuf_ofs;

Index: nodelist.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/nodelist.h,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -r3.11 -r3.12
--- nodelist.h	5 Jan 2005 16:19:00 -0000	3.11
+++ nodelist.h	9 Feb 2005 14:25:14 -0000	3.12
@@ -390,7 +390,7 @@
 void jffs3_erase_block(struct jffs3_sb_info *c, struct jffs3_eraseblock *jeb);
 void jffs3_erase_pending_blocks(struct jffs3_sb_info *c, int count);
 
-#ifdef CONFIG_JFFS3_FS_NAND
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 /* wbuf.c */
 int jffs3_flush_wbuf_gc(struct jffs3_sb_info *c, uint32_t ino);
 int jffs3_flush_wbuf_pad(struct jffs3_sb_info *c);

Index: os-linux.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/os-linux.h,v
retrieving revision 3.4
retrieving revision 3.5
diff -u -r3.4 -r3.5
--- os-linux.h	5 Jan 2005 16:19:00 -0000	3.4
+++ os-linux.h	9 Feb 2005 14:25:15 -0000	3.5
@@ -100,7 +100,7 @@
 
 #define jffs3_is_readonly(c) (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY)
 
-#if (!defined CONFIG_JFFS3_FS_NAND && !defined CONFIG_JFFS3_FS_NOR_ECC)
+#ifndef CONFIG_JFFS3_FS_WRITEBUFFER
 #ifndef CONFIG_JFFS3_SUMMARY
 #define jffs3_can_mark_obsolete(c) (1)
 #else
@@ -153,16 +153,12 @@
 int jffs3_flush_wbuf_pad(struct jffs3_sb_info *c);
 int jffs3_nand_flash_setup(struct jffs3_sb_info *c);
 void jffs3_nand_flash_cleanup(struct jffs3_sb_info *c);
-#ifdef CONFIG_JFFS3_FS_NOR_ECC
+
 #define jffs3_nor_ecc(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_ECC))
 int jffs3_nor_ecc_flash_setup(struct jffs3_sb_info *c);
 void jffs3_nor_ecc_flash_cleanup(struct jffs3_sb_info *c);
-#else
-#define jffs3_nor_ecc(c) (0)
-#define jffs3_nor_ecc_flash_setup(c) (0)
-#define jffs3_nor_ecc_flash_cleanup(c) do {} while (0)
-#endif /* NOR ECC */
-#endif /* NAND */
+
+#endif /* WRITEBUFFER */
 
 /* erase.c */
 static inline void jffs3_erase_pending_trigger(struct jffs3_sb_info *c)

Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/scan.c,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -r3.12 -r3.13
--- scan.c	5 Feb 2005 18:21:55 -0000	3.12
+++ scan.c	9 Feb 2005 14:25:15 -0000	3.13
@@ -39,7 +39,7 @@
 static inline int min_free(struct jffs3_sb_info *c)
 {
 	uint32_t min = 2 * sizeof(struct jffs3_raw_inode);
-#if defined CONFIG_JFFS3_FS_NAND || defined CONFIG_JFFS3_FS_NOR_ECC
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	if (!jffs3_can_mark_obsolete(c) && min < c->wbuf_pagesize)
 		return c->wbuf_pagesize;
 #endif
@@ -194,7 +194,7 @@
 		c->dirty_size -= c->nextblock->dirty_size;
 		c->nextblock->dirty_size = 0;
 	}
-#if defined CONFIG_JFFS3_FS_NAND || defined CONFIG_JFFS3_FS_NOR_ECC
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	if (!jffs3_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size & (c->wbuf_pagesize-1))) {
 		/* If we're going to start writing into a block which already
 		   contains data, and the end of the data isn't page-aligned,
@@ -270,7 +270,7 @@
 	struct jffs3_sum_marker *sm;
 #endif
 
-#ifdef CONFIG_JFFS3_FS_NAND
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	int cleanmarkerfound = 0;
 #endif
 
@@ -279,7 +279,7 @@
 
 	DBG_SCAN(1, "Scanning block at %#x\n", ofs);
 
-#ifdef CONFIG_JFFS3_FS_NAND
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	if (jffs3_cleanmarker_oob(c)) {
 		int ret = jffs3_check_nand_cleanmarker(c, jeb);
 		DBG_SCAN(1, "jffs_check_nand_cleanmarker returned %d\n", ret);
@@ -358,7 +358,7 @@
 		ofs += 4;
 
 	if (ofs == EMPTY_SCAN_SIZE) {
-#ifdef CONFIG_JFFS3_FS_NAND
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 		if (jffs3_cleanmarker_oob(c)) {
 			/* scan oob, take care of cleanmarker */
 			int ret = jffs3_check_oob_empty(c, jeb, cleanmarkerfound);

Index: super-v24.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/super-v24.c,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -r3.5 -r3.6
--- super-v24.c	5 Jan 2005 16:19:01 -0000	3.5
+++ super-v24.c	9 Feb 2005 14:25:15 -0000	3.6
@@ -127,7 +127,7 @@
 	int ret;
 
 	printk(KERN_INFO "JFFS3 version 2.9."
-#ifdef CONFIG_JFFS3_FS_NAND
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	       " (NAND)"
 #endif
 #ifdef CONFIG_JFFS3_SUMMARY

Index: super.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/super.c,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -r3.9 -r3.10
--- super.c	5 Jan 2005 16:19:01 -0000	3.9
+++ super.c	9 Feb 2005 14:25:15 -0000	3.10
@@ -317,7 +317,7 @@
 	int ret;
 
 	NOTICE_MSG("JFFS3 version 2.9."
-#ifdef CONFIG_JFFS3_FS_NAND
+#ifdef CONFIG_JFFS3_FS_WRITEBUFFER
 	       " (NAND)"
 #endif
 #ifdef CONFIG_JFFS3_SUMMARY

Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/wbuf.c,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -r3.14 -r3.15
--- wbuf.c	5 Feb 2005 18:23:38 -0000	3.14
+++ wbuf.c	9 Feb 2005 14:25:15 -0000	3.15
@@ -1172,7 +1172,6 @@
 	kfree(c->wbuf);
 }
 
-#ifdef CONFIG_JFFS3_FS_NOR_ECC
 int jffs3_nor_ecc_flash_setup(struct jffs3_sb_info *c) {
 	/* Cleanmarker is actually larger on the flashes */
 	c->cleanmarker_size = 16;
@@ -1192,4 +1191,3 @@
 void jffs3_nor_ecc_flash_cleanup(struct jffs3_sb_info *c) {
 	kfree(c->wbuf);
 }
-#endif





More information about the linux-mtd-cvs mailing list