[PATCH] mtd-utils: fix corrupt cleanmarker with flash_erase -j command
Brian Norris
computersforpeace at gmail.com
Tue Aug 16 15:42:15 EDT 2011
On Tue, Aug 16, 2011 at 8:06 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Wed, 2011-08-03 at 13:50 +0800, b35362 at freescale.com wrote:
>> From: Liu Shuo <b35362 at freescale.com>
>>
>> Flash_erase -j should fill discrete freeoob areas with required bytes
>> of JFFS2 cleanmarker in jffs2_check_nand_cleanmarker(). Not just fill
>> the first freeoob area.
>
> Hmm, shouldn't we instead make MTD_OOB_AUTO be available for userspace
> via an ioctl instead and make flash_eraseall use it instead?
`nandwrite -o' does a similar thing, where it uses MEMGETOOBSEL to
find open spaces in OOB. Both MEMGETOOBSEL and ECCGETLAYOUT have been
declared obsolete. Plus, the code that uses any of these is somewhat
complicated and duplicated, so I agree that new code probably should
use some form of the internal MTD_OOB_AUTO.
Perhaps this can just be integrated into the new ioctl I'm writing as
a "mode" choice? See the thread:
http://lists.infradead.org/pipermail/linux-mtd/2011-August/037316.html
Brian
More information about the linux-mtd
mailing list