How does UBI FS handle invalid PEB on nand flash
Been reading all of the available documentation on UBI and UBIFS but I cannot find a clear statement on how UBIFS handles production marked invalid PEB's, and if their location is saved; So when a format is done, this information is not lost.
is there a way to make sure UBIFS allways checks for production marked invalid PEB's when a device is started the first time?
Thanks in advance, hope the questions aren't too stupid. :)
- Steven Lauridsen
Quoted 7 lines · Steven Munk Østergaard
Been reading all of the available documentation on UBI and UBIFS but I cannot find a clear statement on how UBIFS handles production marked invalid PEB's, and if their location is saved; So when a format is done, this information is not lost.
is there a way to make sure UBIFS allways checks for production marked invalid PEB's when a device is started the first time?
UBIFS / UBI do not store information about bad eraseblocks. This is handled by MTD. UBI may only query "if this eraseblock is good?" or mark an eraseblock as bad. The bad block management is done at the MTD level. Traditionally, the bad block marker is stored in the OOB of the first page, but there are variations. When MTD initalizes, it scans the entire flash and reads all OOBs, and builds the in-memory bad block table. The other option is on-flash bad block table, which is typically stored at the 2 last good eraseblocks of the flash (AFAIR) and stores information about all bad eraseblocks. In this case you do not need scanning, which is faster. There are flashes which cannot store bad/good status in OOB, they use the on-flash BBT.
Signature · 2 lines
Best Regards, Artem Bityutskiy