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

Artem Bityutskiy dedekind1 at gmail.com
Tue Sep 14 01:26:07 EDT 2010


On Mon, 2010-09-13 at 21:21 -0400, Mike Frysinger wrote:
> so once we have the ability to erase them, you'll merge this ?

Let's see, why not. How about what I suggest below.

> not that i see why we're restricting this behavior in the first place

First of all, bad eraseblock is the eraseblock which should not be used,
because it is bad. Writing to a bad eraseblock should not be allowed.

Your use-case is that an eraseblock is marked as bad incorrectly - by a
mistake or due to some problems.

So what you need is an operation which makes it good again and let's you
use it.

Once you add such operation, you will mark needed eraseblocks as good
again (effectively, erase them, and unmark in in-RAM and/or on-flash
BBD). After this you will not need --nobad option, because the
eraseblock is already good.

> ... policy is for the end user to determine ... this is putting
> artificial limits for no real reason that i can see.

But the problem is not artificial limits. The problem is that I do not
think your option is usable at all, because, as I explained, bad
eraseblock is not necessarily writable, it's contents and the state is
unpredictable. It may contain unstable bits, for example. You really
need to erase it before writing.

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




More information about the linux-mtd mailing list