Skip to content

Commit

Permalink
jffs2: Wake GC thread when there are blocks to be erased
Browse files Browse the repository at this point in the history
Now that we trigger block erases from jffs2_garbage_collect_pass(),
adjust jffs2_thread_should_wake() to return 1 when there are blocks to
erase.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Joakim Tjernlund authored and David Woodhouse committed May 19, 2010
1 parent 0717bf8 commit d6ce171
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/jffs2/nodemgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,10 @@ int jffs2_thread_should_wake(struct jffs2_sb_info *c)
int nr_very_dirty = 0;
struct jffs2_eraseblock *jeb;

if (!list_empty(&c->erase_complete_list) ||
!list_empty(&c->erase_pending_list))
return 1;

if (c->unchecked_size) {
D1(printk(KERN_DEBUG "jffs2_thread_should_wake(): unchecked_size %d, checked_ino #%d\n",
c->unchecked_size, c->checked_ino));
Expand Down

0 comments on commit d6ce171

Please sign in to comment.