[RFC/PATCH] flash_eraseall: extra care if NOR flash is not BIT_WRITEABLE

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Thu Mar 26 11:41:42 EDT 2009


* Jamie Lokier | 2009-03-26 13:44:18 [+0000]:

>Artem Bityutskiy wrote:
>> It sounds wrong to me to make flash_eraseall depend on how JFFS2 is
>> compiled...
>
>It sounds wrong to me as well.
>
>What if you're running flash_eraseall on one kernel - it might not
>even have JFFS2 - and then use the flash later with a different kernel
>with a different setting.

I'm sorry. That is actually my point. The layout of the cleanmarker
(which are used only by JFFS2) depends on a specific kernel switch in
case of NOR flash which is not BIT_WRITEABLE and userland can't know
that.
I've sent a patch to remove the -j option because the generated
cleanmaker *may* be wrong. Artem replied that he would like to see this
fixed.
So here is an attempt to fix this: black listed ubi & data flash but I
dunno how fix the NOR case where does not have BIT_WRITEABLE bit. A
commandline switch for those who know what they do?
Why don't rip out -j and let the kernel create clean marker if it
needs it?

>-- Jamie

Sebastian



More information about the linux-mtd mailing list