public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: Alexander Belyakov <abelyako@googlemail.com>
Cc: "David Woodhouse" <dwmw2@infradead.org>,
	"Jörn Engel" <joern@logfs.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"Alexander Belyakov" <abelyako@mail.ru>
Subject: Re: [PATCH][JFFS2] Fix garbage collector block search
Date: Mon, 25 Feb 2008 13:50:26 +0100	[thread overview]
Message-ID: <20080225125026.GA12429@lazybastard.org> (raw)
In-Reply-To: <fe810cf0801180828g7a48b6a1u69e35f832185b5eb@mail.gmail.com>

[ I have already written a reply, but somehow that got lost.  Sorry
about the delay. ]

On Fri, 18 January 2008 19:28:08 +0300, Alexander Belyakov wrote:
> On 1/15/08, Jörn Engel <joern@logfs.org> wrote:
> >
> > Right now the important thing is to dig deeper and understand the nature
> > of this bug.  You can reproduce it, that is good.  We also know that it
> > makes a difference whether the block is on one list or the other.  But
> > we don't know yet, what difference exactly it makes.
> 
> Question. What is success criteria for jffs2_garbage_collect_pass() execution?
> 
> Why asking? In the case described above jffs2_find_gc_block() fails to
> find erase block for garbage collection but falling into
> jffs2_flush_wbuf_pad(c) which produces amount of erasing blocks. So
> jffs2_garbage_collect_pass() sees no single block for garbage
> collection, but filesystem still recieves fresh erasing blocks upon
> execution.
> 
> Is it success or failure? Theoretically.

Maybe the best answer to this is in jffs2_do_reserve_space:
        /* this needs a little more thought (true <tglx> :)) */

The exit criterium of jffs2_do_reserve_space() should be one of a)
enough free space was found or b) there is not enough free space.  If
the function returns with b) while there actually is more space to be
freed by calling jffs2_flush_wbuf_pad(), that is a bug.

Is this the case?  If it is, there should be blocks on the
erasable_pending_wbuf_list.  And that case is handled (correctly at
first glance) in jffs2_find_nextblock.

That is about as much digging as I will do.  My personal interest is
more in replacing JFFS2 than hunting arcane bugs in it. ;)

Jörn

-- 
And spam is a useful source of entropy for /dev/random too!
-- Jasmine Strong

  reply	other threads:[~2008-02-25 12:51 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
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 [this message]
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=20080225125026.GA12429@lazybastard.org \
    --to=joern@logfs.org \
    --cc=abelyako@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox