Hello, I'm working with a Linux system that, for the most part, uses UBI/UBIFS save for one small MTD that is used for boot-time information. I'm currently working on our tool to manipulate data on this disk and want to ensure it is robust to bad blocks. Looking at the UBI code, the wear-leveling subsystem marks blocks as bad after an erase failure. Which is what I've been doing so far. At a high level, the program does the following when we determine a write is needed: 1. Erase PEB 2a. If erase fails, mark as bad, move to next good PEB, continue. 2b. If erase succeeds, continue 3. Write data structure. Looking at the nandtest.c I see two paths for marking bad blocks, First is on a failed erase, the next is on a failed write. I'm curious if it is recommended to also mark a block as bad an erase succeeds and a subsequent write fails. Regards, ZG ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/