[PATCH v3] mtd: nand: add option to erase NAND blocks even if detected as bad.

Richard Weinberger richard at nod.at
Mon May 15 03:10:58 PDT 2017


Boris,

Am 15.05.2017 um 11:41 schrieb Boris Brezillon:
>> IMHO we can keept it simple such as:
>> echo y > /sys/kernel/debug/nand/<nand-chip-name>/allow-bad-block-erase
>>
>> Then a user can erase whatever he wants...
> 
> Well, I was proposing to do that because several users can use the same
> NAND chip in parallel, and allowing to forcibly erase a bad block at
> the NAND chip level can be dangerous in this case.
> Here is a real example: 2 users are accessing 2 different partitions,
> one wants to force bad block erasure on partition 1, while the other
> just wants to normally erase partition 0. With the global
> "allow/disallow bad block erasure" approach, you're just likely to
> erase bad blocks in partition 0 as well.

Hmm, I'm not sure whether it makes sense to be smart in this case.
If somebody needs to fixup his bad blocks, like Mario described, there
are no other users and such an action should only be done when you
really know what you are doing.
This is a debug knob and not a knob that should be used in production
or while other parts of the chip are in use.

Thanks,
//richard



More information about the linux-mtd mailing list