[PATCH mtd-utils v3] nandmarkbad: new util to mark blocks as bad
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Sep 13 02:53:18 PDT 2017
Hello David,
On Wed, Sep 13, 2017 at 11:39:31AM +0200, David Oberhollenzer wrote:
>
> sorry for the late reply. After requesting the initial changes, I caught up on
> the IRC discussion and came under the impression that it was pretty clear to
> everyone that there are a few major issues with this kind of tool.
>
> First of all, marking a block bad can currently not be undone. The changes this
> tool makes are thus both destructive and irreversible.
>
> If the MTD contains UBI data, UBI has no way of moving the data somewhere else
> if a block just randomly goes bad completely out of the blue.
>
> Besides, if the MTD is attached to an UBI device, UBI already takes care of
> detecting blocks that go bad *over time* and takes care of marking them as
> bad after moving the data somewhere else.
>
> It might be interesting to have such a tool if nand scrub functionality was
> added to the kernel (such as in [1]), allowing the changes done by the tool
> to be undone. But even then, what would be the practical use case for
> such a tool?
I needed it as part of reproducing a problem I was told to fix. I only
used it on a nandsim device for testing. I could imagine though that the
tool could also come handy while developping a mtd driver. But yes, it
would be more useful in combination with a possibility to unmark a bad
block.
In sum: I don't care much if you take it or not. I just thought it might
come handy for someone else and so I shared my work.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
More information about the linux-mtd
mailing list