Re: [PATCH] jffs2: Move erasing from write_super to GC.

Artem Bityutskiy
2010-03-30T12:59:50Z

On Sat, 2010-03-20 at 11:03 +0100, Joakim Tjernlund wrote:
> Erasing blocks is a form of GC and therefore it should live in the
> GC task. By moving it there two problems will be solved:
> 1) unmounting will not hang until all pending blocks has
> been erased.
> 2) Erasing can be paused by sending a SIGSTOP to the GC thread which
> allowes for time critical tasks to work in peace.
>
> Since erasing now is in the GC thread, erases should trigger
> the GC task instead.
> wbuf.c still wants to flush its buffer via write_super so
> invent jffs2_dirty_trigger() and use that in wbuf.
> Remove surplus call to jffs2_erase_pending_trigger() in erase.c
> and remove jffs2_garbage_collect_trigger() from write_super as
> of now write_super() should only commit dirty data to disk.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---

Chatted with dwmw2, and he is fine with your patch, so I'll add it to my
l2 tree, thanks.

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)