[PATCH][JFFS2] Fix garbage collector block search

Alexander Belyakov abelyako at googlemail.com
Mon Jan 14 05:23:45 EST 2008


On Dec 12, 2007 6:51 PM, Alexander Belyakov <abelyako at mail.ru> wrote:
> 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 at 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"));
>
>

Hello, David.

I've sent this jffs2 fix about month ago. Have you received applicable
patch? It should be applicable -- I've sent it to myself and checked
it before sending out.

Have you any comments on this patch?

Thanks,
Alexander



More information about the linux-mtd mailing list