All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: Alexander Belyakov <abelyako@mail.ru>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Alexander Belyakov <abelyako@gmail.com>
Subject: Re: [PATCH][JFFS2] Fix garbage collector block search
Date: Mon, 14 Jan 2008 14:28:43 +0100	[thread overview]
Message-ID: <20080114132843.GA15710@lazybastard.org> (raw)
In-Reply-To: <E1J2Trs-000IFE-00.abelyako-mail-ru@f65.mail.ru>

On Wed, 12 December 2007 18:51:28 +0300, Alexander Belyakov wrote:
> 
> 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.

If the erasable_list is empty, we push it to the list for someone else
to erase it later instead of doing it now?  Nonsense.

If it makes a difference whether the block is erasable or erase_pending,
we have a bug.  And that bug wants a fix, not a paper bandaid.

> 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"));
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 

Jörn

-- 
Joern's library part 14:
http://www.sandpile.org/

  parent reply	other threads:[~2008-01-14 13:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080114132843.GA15710@lazybastard.org \
    --to=joern@logfs.org \
    --cc=abelyako@gmail.com \
    --cc=abelyako@mail.ru \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.