writing to jffs2 is so slow?

Jörn Engel joern at wohnheim.fh-wedel.de
Fri Sep 6 14:57:47 EDT 2002

On Fri, 6 September 2002 11:32:01 -0700, Xiaogeng (Shawn) Jin wrote:
> >
> >Try eraseall from the utils.
> >With that, jffs2 just writes the erase markers to flash, 12 bytes per
> >erase block.
> Well, that's just what I did. Then making a first directory takes 2 minutes.

Yes, you are right, silly me.

Without the erase markers, jffs2 does not trust those blocks. They
could have been deleted almost completely before a power fail. And
that little almost will cause random bit changes sometime liter, which
is bad.

You could maybe use mkfs.jffs2 with the -p option. Might work, but I
cannot check it right now.

Alternatively, you could hack the eraseall code, looking at mkfs.jffs2
for references, to write the erase markers into the flash.

Yet another alternative, you could write the erase markers via the
mtdblock device. Write one into a file, pad to erase block size,
append said file multiple times to itself and write it to flash.


Victory in war is not repetitious.
-- Sun Tzu

More information about the linux-mtd mailing list