Indeed, there is a bug in the NAND driver. After putting in the fix, I see no more bad block error message. However, I repeatedly mount and umount yaffs2 and see more of these messages.
[ 96.070000] yaffs block 7 gc prioritised
[ 96.080000] yaffs block 12 gc prioritised
[ 93.780000] yaffs: Allocation block 7 was not highest sequence id: block seq
= 336920575, dev seq = 2055602175
[42949493.870000] yaffs tragedy: attempting to use non-directory as a directory
in scan. Put in lost+found.
I would appreciate someone explains what went wrong with the last two errors. Thanks.