How does UBI FS handle invalid PEB on nand flash
Artem Bityutskiy
dedekind1 at gmail.com
Wed Jun 27 10:27:59 EDT 2012
On Mon, 2012-06-25 at 16:16 +0200, Steven Munk Østergaard wrote:
> 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.
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120627/6e38a1a9/attachment.sig>
More information about the linux-mtd
mailing list