(This is a resend of a message I sent last week, but I wasn't subscribed to the list at the time so it ended up in list moderator approval land. Apologies in advance if the original message does eventually show up as a duplicate, but I suspect they are buried in a bucket of endless spam and will never be heard from again...) The ECC on yaffs2 packed tags in the OOB works fine, but there is a bug in the tags code which causes the corrected data to be discarded, and the original incorrect tag data is used instead. Here is a very simple patch to correct this (it re-unpacks the packed tags structure in the case that the data is corrected). Without this patch, running yaffs2 on mtd nandsim with bitflips=1 results in significant corruption and eventually system lockups (presumably caused by insane metadata) --- yaffs2-20081017/yaffs_packedtags2.c 2008-05-05 03:58:58.000000000 -0400 +++ yaffs2/yaffs_packedtags2.c 2008-10-29 15:02:39.000000000 -0400 @@ -189,6 +189,7 @@ t->eccResult = YAFFS_ECC_RESULT_NO_ERROR ; break; case 1: + yaffs_UnpackTags2TagsPart(t,&pt->t); t->eccResult = YAFFS_ECC_RESULT_FIXED; break; case -1: