Inband tags is now selected automatically if there is insufficient space
in oob for the tags.
Also add a development feature that supresses bad block marking during development.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
+config YAFFS_DISABLE_BAD_BLOCK_MARKING
+ bool "Disable yaffs2 bad block marking"
+ depends on YAFFS_FS
+ default n
+ help
+ Useful during early flash bring up to prevent problems causing
+ lots of bad block marking.
+
+ If unsure, say N.
+
config YAFFS_XATTR
bool "Enable yaffs2 xattr support"
depends on YAFFS_FS
config YAFFS_XATTR
bool "Enable yaffs2 xattr support"
depends on YAFFS_FS
int always_check_erased; /* Force chunk erased check always on */
int disable_summary;
int always_check_erased; /* Force chunk erased check always on */
int disable_summary;
+ int disable_bad_block_marking;
{
block_no -= dev->block_offset;
dev->n_bad_markings++;
{
block_no -= dev->block_offset;
dev->n_bad_markings++;
+
+ if (dev->param.disable_bad_block_marking)
+ return YAFFS_OK;
+
return dev->tagger.mark_bad_fn(dev, block_no);
}
return dev->tagger.mark_bad_fn(dev, block_no);
}
#include "yaffs_linux.h"
#include "yaffs_mtdif.h"
#include "yaffs_linux.h"
#include "yaffs_mtdif.h"
+#include "yaffs_packedtags2.h"
unsigned int yaffs_trace_mask = YAFFS_TRACE_BAD_BLOCKS | YAFFS_TRACE_ALWAYS;
unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
unsigned int yaffs_trace_mask = YAFFS_TRACE_BAD_BLOCKS | YAFFS_TRACE_ALWAYS;
unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
param->n_reserved_blocks = 5;
param->n_caches = (options.no_cache) ? 0 : 10;
param->n_reserved_blocks = 5;
param->n_caches = (options.no_cache) ? 0 : 10;
- param->inband_tags = options.inband_tags;
+
+ if (mtd->oobavail < sizeof(struct yaffs_packed_tags2) ||
+ options.inband_tags)
+ param->inband_tags = 1;
param->enable_xattr = 1;
if (options.lazy_loading_overridden)
param->enable_xattr = 1;
if (options.lazy_loading_overridden)
param->refresh_period = 500;
param->disable_summary = options.disable_summary;
param->refresh_period = 500;
param->disable_summary = options.disable_summary;
+
+#ifdef CONFIG_YAFFS_DISABLE_BAD_BLOCK_MARKING
+ param->disable_bad_block_marking = 1;
+#endif
if (options.empty_lost_and_found_overridden)
param->empty_lost_n_found = options.empty_lost_and_found;
if (options.empty_lost_and_found_overridden)
param->empty_lost_n_found = options.empty_lost_and_found;
param->empty_lost_n_found);
buf += sprintf(buf, "disable_lazy_load.... %d\n",
param->disable_lazy_load);
param->empty_lost_n_found);
buf += sprintf(buf, "disable_lazy_load.... %d\n",
param->disable_lazy_load);
+ buf += sprintf(buf, "disable_bad_block_mrk %d\n",
+ param->disable_bad_block_marking);
buf += sprintf(buf, "refresh_period....... %d\n",
param->refresh_period);
buf += sprintf(buf, "n_caches............. %d\n", param->n_caches);
buf += sprintf(buf, "refresh_period....... %d\n",
param->refresh_period);
buf += sprintf(buf, "n_caches............. %d\n", param->n_caches);