[PATCH v4 2/2] mtd: nand: write BBM to OOB even with flash-based BBT

Brian Norris computersforpeace at gmail.com
Mon Jan 23 16:31:43 EST 2012


On Sat, Jan 21, 2012 at 2:10 AM, Shmulik Ladkani
<shmulik.ladkani at gmail.com> wrote:
> On Fri, 20 Jan 2012 20:38:04 -0800 Brian Norris <computersforpeace at gmail.com> wrote:
>>               /* Attempt erase before marking OOB */
>
> About to erase the block, but it could have been OOB BBM marked (due
> to former power cut between BBM marking and BBT update).
> Should we test if the OOB BBM is already set, as Artem suggested?
> (at least when NAND_BBT_USE_FLASH && !NAND_BBT_NO_OOB_BBM)

Possibly. This seems useful only for these few cases:
(1) you don't like erasing and rewriting the bad block marker
(2) power cut occurs after erase but before re-writing OOB
(3) write error occurs on re-writing OOB

And I suppose it's not too difficult. We could use chip->block_bad
(defaults to nand_block_bad()) to check this pretty simply.

Brian



More information about the linux-mtd mailing list