public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH][JFFS2] Fix garbage collector block search
@ 2007-12-12 15:51 Alexander Belyakov
  2008-01-14 10:23 ` Alexander Belyakov
  2008-01-14 13:28 ` Jörn Engel
  0 siblings, 2 replies; 25+ messages in thread
From: Alexander Belyakov @ 2007-12-12 15:51 UTC (permalink / raw)
  To: David Woodhouse, linux-mtd@lists.infradead.org,
	Alexander Belyakov

Hello,

The patch checks if erasable_list is empty in jffs2_refile_wbuf_blocks() moving at least one block to that list. So jffs2_find_gc_block() will not fail sometimes with "jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they all?" message.

Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com>

diff -uNr a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
--- a/fs/jffs2/wbuf.c	2007-12-03 17:00:16.000000000 +0300
+++ b/fs/jffs2/wbuf.c	2007-12-11 19:03:03.000000000 +0300
@@ -115,7 +115,7 @@
 
 		D1(printk(KERN_DEBUG "Removing eraseblock at 0x%08x from erasable_pending_wbuf_list...\n", jeb->offset));
 		list_del(this);
-		if ((jiffies + (n++)) & 127) {
+		if (((jiffies + (n++)) & 127) && !list_empty(&c->erasable_list)) {
 			/* Most of the time, we just erase it immediately. Otherwise we
 			   spend ages scanning it on mount, etc. */
 			D1(printk(KERN_DEBUG "...and adding to erase_pending_list\n"));

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2008-04-24 11:21 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-12 15:51 [PATCH][JFFS2] Fix garbage collector block search Alexander Belyakov
2008-01-14 10:23 ` Alexander Belyakov
2008-01-14 13:28 ` Jörn Engel
2008-01-15 12:24   ` Alexander Belyakov
2008-01-15 13:33     ` Jörn Engel
2008-01-18 16:28       ` Alexander Belyakov
2008-02-25 12:50         ` Jörn Engel
2008-04-22 16:47         ` David Woodhouse
2008-04-23 11:31           ` Alexander Belyakov
2008-04-23 11:32             ` David Woodhouse
2008-04-23 13:08               ` Alexander Belyakov
2008-04-23 14:01                 ` David Woodhouse
2008-04-23 14:30                   ` David Woodhouse
2008-04-23 15:25                     ` Alexander Belyakov
2008-04-23 15:30                       ` David Woodhouse
2008-04-24  7:17                         ` Alexander Belyakov
2008-04-24  7:28                           ` David Woodhouse
2008-04-24  7:48                             ` Alexander Belyakov
2008-04-24  7:51                               ` David Woodhouse
2008-04-24 10:14                                 ` Alexander Belyakov
2008-04-24 10:32                                   ` David Woodhouse
2008-04-24 10:42                                     ` Alexander Belyakov
2008-04-24 11:05                                       ` David Woodhouse
2008-04-24 11:11                                         ` Jörn Engel
2008-04-24 11:21                                         ` Alexander Belyakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox