[PATCH] nandwrite: add --nobad to write bad blocks

Mike Frysinger vapier at gentoo.org
Wed Sep 29 09:25:42 EDT 2010


On Wed, Sep 29, 2010 at 02:56, Jon Povey wrote:
> linux-mtd-bounces at lists.infradead.org wrote:
>> Mike Frysinger wrote:
>>> i'm open to logic, but i cant figure out your side.  all i can see is
>>> "it's been this way" and "we shouldnt write bad blocks".  but both
>>> sound like policies that the end user should have control over rather
>>> than the userspace utils always enforcing.  so if you feel i've
>>> missed something, please highlight it.
>>
>> while I agree with the philosophy to allow users to shoot
>> themselves in the foot if they really like that sort of thing,
>> the "don't touch bad blocks" rule makes sense and it's not
>> necessarily obvious.
>
> [manufacturer-marked bad blocks]
>
>> Thus the rule about not touching bad blocks. It's the only
>> way to make sure that you don't end up with a batch of products
>> that will die on the shelf, after you successfully tested them.
>
> I can't speak for Mike, but I have run into a few situations where
> blocks were marked bad incorrectly. For example, the ROM bootloader of
> a chip I work with requires a different OOB layout to that specified by
> the NAND flash manufacturer, so to write the second-stage bootloader
> you must write data into what is, as far as the NAND maker is concerned,
> the OOB area. Then when u-boot or Linux loads, it finds no BBT, scans
> the bootloader, finds non-FF OOB and marks it bad.

this is actually the same situation i am dealing with (i doubt we're
using the same processor though), and as i described in my original
posting: "like when the block isn't actually bad but the OOB layout
isn't what the kernel is expecting or is otherwise screwed up".
-mike



More information about the linux-mtd mailing list