#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;
struct yaffs_param *param;
int read_only = 0;
+ int inband_tags = 0;
struct yaffs_options options;
yaffs_version = 1;
}
- if(yaffs_verify_mtd(mtd, yaffs_version, options.inband_tags) < 0)
+ if (mtd->oobavail < sizeof(struct yaffs_packed_tags2) ||
+ options.inband_tags)
+ inband_tags = 1;
+
+ if(yaffs_verify_mtd(mtd, yaffs_version, inband_tags) < 0)
return NULL;
/* OK, so if we got here, we have an MTD that's NAND and looks
param->n_reserved_blocks = 5;
param->n_caches = (options.no_cache) ? 0 : 10;
- param->inband_tags = options.inband_tags;
+ param->inband_tags = inband_tags;
param->enable_xattr = 1;
if (options.lazy_loading_overridden)
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;
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);