changeset 418:ff48885b11fb

yaffs: Improve debug chunk erased checking, change refreshPeriod Normalise macro to YAFFS_CONFIG_ALWAYS_CHECK_CHUNK_ERASED. This reduces performance so output kernel message warning this is enabled. Change refreshPeriod to make it much slower. Signed-off-by: Charles Manning <cdhmanning@gmail.com>
author Charles Manning <cdhmanning@gmail.com>
date Thu, 29 Apr 2010 13:40:28 +1200
parents 4aa32dd45dc8
children 64d5ca151c17
files moduleconfig.h yaffs_fs.c
diffstat 2 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/moduleconfig.h
+++ b/moduleconfig.h
@@ -38,9 +38,10 @@
 /*          CONFIG_YAFFS_DOES_ECC is set */
 /* #define CONFIG_YAFFS_ECC_WRONG_ORDER */
 
-/* Default: Selected */
-/* Meaning: Disables testing whether chunks are erased before writing to them*/
-#define CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK
+/* Default: Not selected */
+/* Meaning: Always test whether chunks are erased before writing to them.
+	    Use during mtd debugging and init. */
+/* #define CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED */
 
 /* Default: Not Selected */
 /* Meaning: At mount automatically empty all files from lost and found. */
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -2648,7 +2648,7 @@ static struct super_block *yaffs_interna
 #ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
 	param->refreshPeriod = 0;
 #else
-	param->refreshPeriod = 100;
+	param->refreshPeriod = 500;
 #endif
 
 	if(options.empty_lost_and_found_overridden)
@@ -3178,6 +3178,14 @@ static int __init init_yaffs_fs(void)
 	T(YAFFS_TRACE_ALWAYS,
 	  (TSTR("yaffs built " __DATE__ " " __TIME__ " Installing. \n")));
 
+#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
+	T(YAFFS_TRACE_ALWAYS,
+	  (TSTR(" \n\n\n\nYAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.\n\n\n\n")));
+#endif
+
+
+
+
 	init_MUTEX(&yaffs_context_lock);
 
 	/* Install the proc_fs entries */