mounting "unformatted" nandflash
Ricard Wanderlof
ricard.wanderlof at axis.com
Wed Jan 9 11:30:49 EST 2008
Hi all,
Before I start digging into this myself, perhaps someone here has an
answer.
We are running an embedded system with 128 megs of nand flash
(large-block). To put it simply, our scenario is that we mount a large
portion of empty flash as a jffs2 partition. Since the partition is empty,
there are no [oob] cleanmarkers, and upon mounting, jffs2 scans the
partition, marks all blocks as needing erasure; this is then ultimately
controlled by the pdflush kernel task.
The strange thing is that pdflush then takes almost 100% cpu for a minute
or so to complete. Erasing the whole flash (e.g. using flash_eraseall)
just takes a few seconds, writing the cleanmarkers should take even less.
So why is pdflush taking so much time to complete it's task? I've figured
that it must be the erase/cleanmarker-write process which is the culprit,
as upon rebooting pdflush exhibits no such behavior when the cleanmarkers
are in place).
(Yes, in this case we could use flash_eraseall -j (which incidently
doesn't seem to work but could be easily fixed) to 'format' the partition
in question. However, for various reasons this isn't practical for us as
the initial flash write is done using a non-linux tool).
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list