[PATCH] mtd: nand: write bad block marker even with BBT

Brian Norris computersforpeace at gmail.com
Wed Dec 14 15:46:59 EST 2011


On Mon, Dec 12, 2011 at 11:48 PM, Shmulik Ladkani
<shmulik.ladkani at gmail.com> wrote:
> What about the following scheme for 'nand_default_block_markbad' in case
> NAND_BBT_WRITE_BBM is on:
>
> 1. Invalidate exising on-flash BBT
> 2. Update the BI marker on the OOB
> 3. Update the on-flash BBT

Generally looks OK, but it complicates things unnecessarily IMO...

> I guess this is a bigger change than the patch suggested, since
> 'nand_bbt.c' should expose interface for invalidating the BBT.

Yes, and I don't want to rewrite nand_bbt just to expose an interface
simply for an esoteric power cut case.

> Also, need to examine if this scheme fits a scenario where there are
> both main and mirror BBTs.

This is one of the problems. We would need to invalidate both BBTs in
step 1, making our attempts at mirroring pointless. In fact, in some
power cut cases, we could be left in a worse condition than if we
didn't try to compensate for power cuts, since we just killed our
backup table.

Brian



More information about the linux-mtd mailing list