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

Artem Bityutskiy dedekind1 at gmail.com
Mon Sep 13 02:23:10 EDT 2010

On Sun, 2010-09-12 at 15:05 -0400, Mike Frysinger wrote:
> On Sun, Sep 12, 2010 at 12:27, Artem Bityutskiy wrote:
> > On Sat, 2010-09-11 at 23:51 -0400, Mike Frysinger wrote:
> >> Sometimes dumping bad blocks is useful, like when the block isn't actually
> >> bad but the OOB layout isn't what the kernel is expecting or is otherwise
> >> screwed up.  The --nobad option allows just that.
> >
> > How useful is this? I think instead you should implement the force flag
> > we discussed and deal with 'otherwise screwed up' eraseblocks with
> > flash_erase. I am afraid it is too dangerous to introduce this option.
> i dont see how this is any more dangerous than adding an option to
> force erasing of bad blocks ?  why should we be over protective of the
> system ?

Because it was like this for long time and people are accustomed to the
fact that if a block is marked as bad, nothing will happen to it.

Besides, if I misuse options and lose a really bad block, it is very
difficult to find it again.

>   this is what got is into the existing rut of unrecoverable
> blocks.

> i find it useful during development to write out the content of pages
> irregardless of the bad blocks and then read them back.

But if a block is marked as bad, the current contents of it is not
necessarily 0xFFs and it does not necessarily ready to be written. You
have to first erase it.

So my point was - please, first provide the means to erase them.

>   and for
> recovering systems manually without having to resort to local access
> to the bootloader.
> -mike

Best Regards,
Artem Bityutskiy (Артём Битюцкий)

More information about the linux-mtd mailing list