From: Charles Manning Date: Mon, 8 Nov 2010 23:01:50 +0000 (+1300) Subject: yaffs: Remove SHORT_NAMES_IN_RAM and WIDE_TNODE_DISABLE configs X-Git-Tag: linux-mainline-patchset-4~111 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=376375059d26aeb3fca08ba9dfd1f9b8b5842c75 yaffs: Remove SHORT_NAMES_IN_RAM and WIDE_TNODE_DISABLE configs 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 --- diff --git a/Kconfig b/Kconfig index 7b3988c..6354140 100644 --- 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. - - diff --git a/direct/basic-test/Makefile b/direct/basic-test/Makefile index 7847528..2c558f0 100644 --- a/direct/basic-test/Makefile +++ b/direct/basic-test/Makefile @@ -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 diff --git a/direct/python/Makefile b/direct/python/Makefile index 7c7a063..38f8b11 100644 --- a/direct/python/Makefile +++ b/direct/python/Makefile @@ -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 diff --git a/direct/tests/Makefile b/direct/tests/Makefile index 016b934..956e34f 100644 --- a/direct/tests/Makefile +++ b/direct/tests/Makefile @@ -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 diff --git a/moduleconfig.h b/moduleconfig.h index 20a0882..83cf0c1 100644 --- a/moduleconfig.h +++ b/moduleconfig.h @@ -49,10 +49,6 @@ /* 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. */ diff --git a/yaffs_guts.c b/yaffs_guts.c index 53c2ff6..110a3c2 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -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); } diff --git a/yaffs_guts.h b/yaffs_guts.h index 60770ca..2c2ec76 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -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 diff --git a/yaffs_vfs_single.c b/yaffs_vfs_single.c index 146aaef..61bf255 100644 --- a/yaffs_vfs_single.c +++ b/yaffs_vfs_single.c @@ -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;