Hook wide tnode support into Linux
authorcharles <charles>
Wed, 7 Dec 2005 22:19:26 +0000 (22:19 +0000)
committercharles <charles>
Wed, 7 Dec 2005 22:19:26 +0000 (22:19 +0000)
Kconfig
yaffs_fs.c

diff --git a/Kconfig b/Kconfig
index da516ddbc060478e1f50475576782492b6bfd1e3..7127050336ce79d38cb1d4d175bfba94644a4607 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -58,6 +58,21 @@ config YAFFS_YAFFS2
 
          If unsure, say Y.
 
+config YAFFS_DISABLE_WIDE_TNODES
+       bool "Turn off wide tnodes"
+       depends on YAFFS_FS
+       default n
+       help
+         Wide tnodes are only used for large NAND arrays (>=32MB for
+         512-byte page devices and >=128MB for 2k page devices). They use 
+         slightly more RAM but are faster since they eliminate chunk group
+         searching.
+
+         Setting this to 'y' will force tnode width to 16 bits and make
+         large arrays slower.
+
+         If unsure, say N.
+
 config YAFFS_DISABLE_CHUNK_ERASED_CHECK
        bool "Turn off debug chunk erase check"
        depends on YAFFS_FS
index 02d6b82197e101a89a286068c4fcbd7f5b138024..f97455b00a71453ca5c654f5c5565fab10f6a2b3 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 const char *yaffs_fs_c_version =
-    "$Id: yaffs_fs.c,v 1.34 2005-11-14 21:00:54 charles Exp $";
+    "$Id: yaffs_fs.c,v 1.35 2005-12-07 22:19:26 charles Exp $";
 extern const char *yaffs_guts_c_version;
 
 #include <linux/config.h>
@@ -1465,6 +1465,10 @@ static struct super_block *yaffs_internal_read_super(int yaffsVersion,
        dev->useNANDECC = 1;
 #endif
 
+#ifdef CONFIG_YAFFS_DISABLE_WIDE_TNODES
+       dev->wideTnodesDisabled = 1;
+#endif
+
        /* we assume this is protected by lock_kernel() in mount/umount */
        list_add_tail(&dev->devList, &yaffs_dev_list);