sync() takes minutes while erasing

Jörn Engel joern at
Wed Jun 20 12:29:50 EDT 2007

On Wed, 20 June 2007 18:26:36 +0200, Joakim Tjernlund wrote:
> On Wed, 2007-06-20 at 11:09 -0500, Josh Boyer wrote:
> > 
> > jffs2_write_super is called during unmount.  If there are blocks pending
> > on the erase list, it's better to erase those now before the unmount is
> > completed.  Saves some time on the next mount.
> No, not if the reboot/unmont is suspended for minutes just because jffs2
> wants to finish erasing. It doesn't save you much, if anything, at
> remount either.
> The erasing in context is just something that needs to be done at some
> point but it don't have to happen now.

In case you need an example:

$ flash_eraseall /dev/mtd0
$ time mount mtd0 /mnt -t jffs2
$ time umount /mnt

Depending on device size, this will take some seconds for mount and some
minutes for umount.  Spending minutes to save some seconds on next mount
hardly sounds sensible.


"Security vulnerabilities are here to stay."
-- Scott Culp, Manager of the Microsoft Security Response Center, 2001

More information about the linux-mtd mailing list