sync() takes minutes while erasing

David Woodhouse dwmw2 at infradead.org
Thu Jun 28 14:54:21 EDT 2007


On Wed, 2007-06-20 at 16:49 +0200, Joakim Tjernlund wrote:
> Ok, found the cause:
>  jffs2_erase_pending_blocks(c, 0) is called from
>  jffs2_write_super() and it hangs until all
>  pending erases are complete.
> 
> Why do jffs2_write_super() need to call 
> jffs2_erase_pending_blocks(c, 0)? Seems like a bad idea to me. 

It's because pdflush is the best context I could find for actually doing
the erases we need. But now I think we can use pdflush_operation()
instead of having to do it from write_super(), so maybe we can fix the
thing that offends you.

-- 
dwmw2




More information about the linux-mtd mailing list