yaffs: Improve debug chunk erased checking, change refreshPeriod
authorCharles Manning <cdhmanning@gmail.com>
Thu, 29 Apr 2010 01:40:28 +0000 (13:40 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 29 Apr 2010 01:40:28 +0000 (13:40 +1200)
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>
moduleconfig.h
yaffs_fs.c

index 89eeec83585026cf81a183322869c5aed88a157f..e8efd67586a7c3fe7764695e06eb0dfadf1ce101 100644 (file)
 /*          CONFIG_YAFFS_DOES_ECC is set */
 /* #define CONFIG_YAFFS_ECC_WRONG_ORDER */
 
 /*          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. */
 
 /* Default: Not Selected */
 /* Meaning: At mount automatically empty all files from lost and found. */
index 07ff66e13e9c965b842b47459df59d2d27dca369..6eb356c81e6e4276c0ca88813e7b83082b788bd9 100644 (file)
@@ -2648,7 +2648,7 @@ static struct super_block *yaffs_internal_read_super(int yaffsVersion,
 #ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
        param->refreshPeriod = 0;
 #else
 #ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
        param->refreshPeriod = 0;
 #else
-       param->refreshPeriod = 100;
+       param->refreshPeriod = 500;
 #endif
 
        if(options.empty_lost_and_found_overridden)
 #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")));
 
        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 */
        init_MUTEX(&yaffs_context_lock);
 
        /* Install the proc_fs entries */