jffs2: Wake GC thread when there are blocks to be erased
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed May 19 17:59:02 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d6ce171069635f05737935adc813b4d48d71a583
Commit: d6ce171069635f05737935adc813b4d48d71a583
Parent: 0717bf8411bb673dd2369aaa096f7396446b38f5
Author: Joakim Tjernlund <joakim.tjernlund at transmode.se>
AuthorDate: Wed May 19 16:55:40 2010 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed May 19 16:55:40 2010 +0100
jffs2: Wake GC thread when there are blocks to be erased
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 at transmode.se>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
fs/jffs2/nodemgmt.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 08e2c69..5ab5c85 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -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));
More information about the linux-mtd-cvs
mailing list