From: "Jörn Engel" <joern@logfs.org>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: linux-mtd@lists.infradead.org,
Damir Shayhutdinov <lost404@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] [JFFS2] Fix free space leaking
Date: Thu, 21 Feb 2008 12:11:48 +0100 [thread overview]
Message-ID: <20080221111148.GA10791@lazybastard.org> (raw)
In-Reply-To: <1202293219.25864.45.camel@gentoo-jocke.transmode.se>
On Wed, 6 February 2008 11:20:19 +0100, Joakim Tjernlund wrote:
> On Tue, 2007-11-13 at 13:23 +0300, Damir Shayhutdinov wrote:
> > This patch is addressed to fix very-long-standing problem in JFFS2,
> > first described in 2004:
> > http://lists.infradead.org/pipermail/linux-mtd/2004-March/009456.html
> >
> > jffs2_link_node_ref() decreases c->free_size by
> > c->cleanmarker_size but the clean marker space can't
> > be accounted as free space! So we just compensate
> > the difference.
> >
> > Signed-off-by: Alexander Yurchenko <grange@tecon.ru>
> > Signed-off-by: Damir Shayhutdinov <damir@tecon.ru>
> > ---
> > fs/jffs2/erase.c | 11 +++++++++++
> > 1 files changed, 11 insertions(+), 0 deletions(-)
> >
> > diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
> > index a1db918..c574fa3 100644
> > --- a/fs/jffs2/erase.c
> > +++ b/fs/jffs2/erase.c
> > @@ -454,6 +454,17 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
> > jeb->free_size = c->sector_size;
> > /* FIXME Special case for cleanmarker in empty block */
> > jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL, c->cleanmarker_size, NULL);
> > + /*
> > + * XXX: I'm not sure this is correct but it prevents
> > + * c->free_size from slow leaking under a frequent file
> > + * overwriting.
> > + * jffs2_link_node_ref() decreases c->free_size by
> > + * c->cleanmarker_size but the clean marker space can't
> > + * be accounted as free space! So we just compensate
> > + * the difference.
> > + */
> > + c->free_size += c->cleanmarker_size;
> > + c->used_size -= c->cleanmarker_size;
> > }
> >
> > down(&c->erase_free_sem);
>
> What happened to this patch? Just forgotten or was it rejected?
No idea, but it might help to add dwmw2 to Cc:.
Jörn
--
Joern's library part 4:
http://www.paulgraham.com/spam.html
next prev parent reply other threads:[~2008-02-21 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 10:23 [PATCH] [JFFS2] Fix free space leaking Damir Shayhutdinov
2008-02-06 10:20 ` Joakim Tjernlund
2008-02-06 18:48 ` Damir Shayhutdinov
2008-02-21 11:11 ` Jörn Engel [this message]
2008-02-21 11:39 ` David Woodhouse
2008-04-03 9:03 ` Martin Creutziger
2008-04-22 23:16 ` David Woodhouse
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=20080221111148.GA10791@lazybastard.org \
--to=joern@logfs.org \
--cc=dwmw2@infradead.org \
--cc=joakim.tjernlund@transmode.se \
--cc=linux-mtd@lists.infradead.org \
--cc=lost404@gmail.com \
/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