yaffs: Remove SHORT_NAMES_IN_RAM and WIDE_TNODE_DISABLE configs
authorCharles Manning <cdhmanning@gmail.com>
Mon, 8 Nov 2010 23:01:50 +0000 (12:01 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 8 Nov 2010 23:01:50 +0000 (12:01 +1300)
These have been removed from Linux as their use is discouraged except
for debugging purposes.

The logic has also changed for SHORT_NAMES_IN_RAM. This is now negative
logic. Set  CONFIG_YAFFS_NO_SHORT_NAMES to **disable** short names.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Kconfig
direct/basic-test/Makefile
direct/python/Makefile
direct/tests/Makefile
moduleconfig.h
yaffs_guts.c
yaffs_guts.h
yaffs_vfs_single.c

diff --git a/Kconfig b/Kconfig
index 7b3988c3a01474d89b742d253c1d82793876b96a..635414059997d1efcd89eea9e49cc068bcaf6004 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -102,22 +102,6 @@ config YAFFS_DISABLE_TAGS_ECC
 
          If unsure, say N.
 
-
-config YAFFS_DISABLE_WIDE_TNODES
-       bool "Turn off wide tnodes"
-       depends on YAFFS_FS
-       default n
-       help
-         Wide tnodes are only used for 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 save
-         memory but make large arrays slower.
-
-         If unsure, say N.
-
 config YAFFS_ALWAYS_CHECK_CHUNK_ERASED
        bool "Force chunk erase check"
        depends on YAFFS_FS
@@ -136,17 +120,6 @@ config YAFFS_ALWAYS_CHECK_CHUNK_ERASED
 
          If unsure, say Y.
 
-config YAFFS_SHORT_NAMES_IN_RAM
-       bool "Cache short names in RAM"
-       depends on YAFFS_FS
-       default y
-       help
-         If this config is set, then short names are stored with the
-         yaffs_Object.  This costs an extra 16 bytes of RAM per object,
-         but makes look-ups faster.
-
-         If unsure, say Y.
-
 config YAFFS_EMPTY_LOST_AND_FOUND
        bool "Empty lost and found on boot"
        depends on YAFFS_FS
@@ -177,7 +150,7 @@ config YAFFS_DISABLE_BACKGROUND
         If this is set, then background processing is disabled.
         Background processing makes many foreground activities faster.
 
-         If unsure, say N.
+        If unsure, say N.
 
 config YAFFS_XATTR
        bool "Enable yaffs2 xattr support"
@@ -186,5 +159,3 @@ config YAFFS_XATTR
        help
         If this is set then yaffs2 will provide xattr support.
         If unsure, say Y.
-
-
index 7847528ef3b7e3cc16d0275f3c60a2295ae784a0..2c558f0732a5e253a76d6d8e0bb3f6e83d150cae 100644 (file)
@@ -18,7 +18,7 @@
 
 #EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
 
-CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2  
+CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_YAFFS2  
 CFLAGS +=     -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES -DNO_Y_INLINE
 CFLAGS +=    -Wall -g $(EXTRA_COMPILE_FLAGS) -Werror=strict-aliasing 
 #CFLAGS +=    -fno-strict-aliasing
index 7c7a063120874e518d473d0e33e9285f691599d6..38f8b11420bcd1f957661bfae02811e03f436ad2 100644 (file)
@@ -18,7 +18,7 @@
 
 #EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
 
-CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2  
+CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_YAFFS2  
 CFLAGS +=     -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES -DNO_Y_INLINE
 CFLAGS +=    -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing 
 #CFLAGS +=    -fno-strict-aliasing
index 016b9346398e6545c6fef1d6cda54a8046adf193..956e34fadf68c9543e3cfbcd354353212c4413e8 100644 (file)
@@ -18,7 +18,7 @@
 
 #EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
 
-CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2  
+CFLAGS =      -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_YAFFS2  
 CFLAGS +=     -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
 CFLAGS +=    -Wall -g $(EXTRA_COMPILE_FLAGS) -Wstrict-aliasing 
 #CFLAGS +=    -fno-strict-aliasing
index 20a08821985788cb66add99fc73f0af1c7174a1c..83cf0c1fada93acf630fe2c2457d9760651d8368 100644 (file)
 /* empty directory. This can also be achieved with a mount option. */
 #define CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
 
-/* Default: Selected */
-/* Meaning: Cache short names, taking more RAM, but faster look-ups */
-#define CONFIG_YAFFS_SHORT_NAMES_IN_RAM
-
 /* Default: Unselected */
 /* Meaning: Select to disable block refreshing. */
 /* Block Refreshing periodically rewrites the oldest block. */
index 53c2ff6349360266ee2302d00259e32b5bbb47a6..110a3c2f778b18ed81c28630453505e1c311a467 100644 (file)
@@ -604,12 +604,10 @@ static u16 yaffs_calc_name_sum(const YCHAR * name)
 
 void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR * name)
 {
-#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
-       memset(obj->short_name, 0,
-              sizeof(YCHAR) * (YAFFS_SHORT_NAME_LENGTH + 1));
-       if (name
-           && yaffs_strnlen(name,
-                            YAFFS_SHORT_NAME_LENGTH + 1) <=
+#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
+       memset(obj->short_name, 0, sizeof(obj->short_name));
+       if (name && 
+               yaffs_strnlen(name, YAFFS_SHORT_NAME_LENGTH + 1) <=
            YAFFS_SHORT_NAME_LENGTH)
                yaffs_strcpy(obj->short_name, name);
        else
@@ -4540,7 +4538,7 @@ int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR * name, int buffer_size)
        if (obj->obj_id == YAFFS_OBJECTID_LOSTNFOUND) {
                yaffs_strncpy(name, YAFFS_LOSTNFOUND_NAME, buffer_size - 1);
        }
-#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
+#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
        else if (obj->short_name[0]) {
                yaffs_strcpy(name, obj->short_name);
        }
index 60770ca7e10040e0f7da693ad833726586454433..2c2ec765c6365e1bdf52125741f404a7b01f131a 100644 (file)
@@ -422,7 +422,7 @@ struct yaffs_obj {
 
        u32 yst_mode;
 
-#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
+#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
        YCHAR short_name[YAFFS_SHORT_NAME_LENGTH + 1];
 #endif
 
index 146aaef57e0e5417b2bda0df748f8890e0116b7e..61bf255078c53f6892f0b932e3b41d45f48f0067 100644 (file)
@@ -2432,10 +2432,6 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        param->use_nand_ecc = 1;
 #endif
 
-#ifdef CONFIG_YAFFS_DISABLE_WIDE_TNODES
-       param->wide_tnodes_disabled = 1;
-#endif
-
        param->skip_checkpt_rd = options.skip_checkpoint_read;
        param->skip_checkpt_wr = options.skip_checkpoint_write;