sync() takes minutes while erasing

Josh Boyer jwboyer at linux.vnet.ibm.com
Wed Jun 20 12:59:43 EDT 2007


On Wed, 2007-06-20 at 18:45 +0200, Joakim Tjernlund wrote:
> On Wed, 2007-06-20 at 18:29 +0200, Jörn Engel wrote:
> > 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.
> > 
> > Jörn
> 
> Exactly, 

Ok, you've both convinced me.

> David where are you? You havn't been active for a long time.

He's in China on business.

> Is there any reason to keep as is?

Maybe not.  We definitely want it to flush the write buffer and complete
any block in the _middle_ of an erase though.

josh




More information about the linux-mtd mailing list