#1: mods to allow EUCLEAN and EBADMSG to percolate up into YAFFS bbt handling diff -r yaffs2-8a3135f/yaffs_mtdif2_multi.c yaffs2-8a3135f.patched/yaffs_mtdif2_multi.c 194c194 < && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) { --- > /* KAM && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR*/) { 199c199 < && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) { --- > /* KAM && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR*/) { #2: mods to create new yaffs mount option "chunk-error-strikes-max-xx" diff -r yaffs2-8a3135f/yaffs_guts.c yaffs2-8a3135f.patched/yaffs_guts.c 37a38,41 > /* Extern declarations */ > > extern unsigned int yaffs_chunk_error_strikes_max; // KAM: see: yaffs_vfs_multi.c > 219c223 < if (bi->chunk_error_strikes > 3) { --- > if (bi->chunk_error_strikes > yaffs_chunk_error_strikes_max) { diff -r yaffs2-8a3135f/yaffs_vfs_multi.c yaffs2-8a3135f.patched/yaffs_vfs_multi.c 38a39 > #include // KAM - for simple_strtol 187a189,190 > unsigned int yaffs_chunk_error_strikes_max = 3; // KAM - could not find a way to access options in yaffs_guts.c - created global > 2540a2544 > int chunk_error_strikes_max; // KAM 2542a2547,2561 > // KAM - start new code > #define STRIKES_OPTION_PREFIX "chunk-error-strikes-max-" > > static int get_strikes_from_option(char* option) { > int strikes = 3; // default > char* start = strstr(option, STRIKES_OPTION_PREFIX); > if (start != NULL) { > char* end; > start = start + strlen(STRIKES_OPTION_PREFIX); // skip prefix > strikes = (int)simple_strtol(start,&end,10); > } > return strikes; > } > // KAM - end new code > 2598a2618,2619 > } else if (strstr(cur_opt, STRIKES_OPTION_PREFIX) != NULL) { // KAM > options->chunk_error_strikes_max = get_strikes_from_option(cur_opt); // KAM 2717a2739,2741 > yaffs_trace(YAFFS_TRACE_OS, "chunk_error_strikes_max %d", options.chunk_error_strikes_max); // KAM > yaffs_chunk_error_strikes_max = options.chunk_error_strikes_max; // KAM - could not find a way to access options in yaffs_guts.c - created global >