From: charles Date: Wed, 7 Dec 2005 22:19:26 +0000 (+0000) Subject: Hook wide tnode support into Linux X-Git-Tag: pre-name-change~383 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=1c37d23fde7e4f63dd764f2fa0c1f2d747ea2a01;ds=sidebyside Hook wide tnode support into Linux --- diff --git a/Kconfig b/Kconfig index da516dd..7127050 100644 --- 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 diff --git a/yaffs_fs.c b/yaffs_fs.c index 02d6b82..f97455b 100644 --- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -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 @@ -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);