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

Joakim Tjernlund
2010-05-18T18:20:55Z

David Woodhouse <dwmw2@infradead.org> wrote on 2010/05/18 17:46:27:
>
> On Fri, 2010-05-14 at 14:12 +0200, Joakim Tjernlund wrote:
> > @@ -167,8 +170,6 @@ static void jffs2_erase_succeeded(struct jffs2_sb_info
> *c, struct jffs2_eraseblo
> > list_move_tail(&jeb->list, &c->erase_complete_list);
> > spin_unlock(&c->erase_completion_lock);
> > mutex_unlock(&c->erase_free_sem);
> > - /* Ensure that kupdated calls us again to mark them clean */
> > - jffs2_erase_pending_trigger(c);
> > }
> >
> > static void jffs2_erase_failed(struct jffs2_sb_info *c, struct
> jffs2_eraseblock *jeb, uint32_t bad_offset)
>
> Why remove this? If you have asynchronous erases, with the erase
> callback (and hence this jffs2_erase_succeeded function) getting called
> asynchronously, then we _do_ want to trigger the GC thread to run, to
> that it can write the cleanmarker to the block and refile it on the
> empty_list.

hmm, I haven't given async erases much thought(is anyone using that?)
but yes it looks premature to remove this. Could you add that back or
do you want me to submit another patch?