Re: block in clean list with wasted space
Estelle HAMMACHE <[email protected]> Tue, 28 Sep 2004 14:59:49 +0200
| Newsgroups | gmane.linux.file-systems.jffs |
|---|---|
| Message-ID | <[email protected]> |
Hi Jörn,
thank you for your answer and advice.
Estelle
Jörn Engel wrote:
>
> On Mon, 27 September 2004 15:36:00 +0200, Estelle HAMMACHE wrote:
> >
> > Merely checking wasted_size seems to do the trick.
> > Here is the patch, which also includes my other modification of
> > nodemgmt.c for NAND Flash : flush the wbuf when GC fails
> > because all blocks are in erasable_pending_wbuf_list
> > (which I am unsure about regarding which locks are needed in
> > a multi-tasking environment)
> > BTW could anyone tell me that you _have_ received this message ?
> > I feel like I'm talking to myself here.
>
> I have. Jffs list is quite quiet, usually, few people are subscribed
> to it.
>
> > --- nodemgmt.c ($Id: nodemgmt.c,v 1.107 2003/11/26 15:30:58 dwmw2 Exp $)
> > +++ nodemgmt.c (my version)
> > @@ -118,7 +118,15 @@
> >
> > ret = jffs2_garbage_collect_pass(c);
> > if (ret)
> > - return ret;
> > + {
> > + if ((ret == -EIO) && !list_empty(&c->erasable_pending_wbuf_list))
> > + {
> > + D1(printk(KERN_DEBUG "jffs2: Flushing write buffer instead of garbage collect\n"));
> > + jffs2_flush_wbuf_pad(c);
> > + }
> > + else
> > + return ret;
> > + }
> >
> > cond_resched();
> >
> > @@ -332,7 +340,7 @@
> > c->used_size += len;
> > }
> >
> > - if (!jeb->free_size && !jeb->dirty_size) {
> > + if (!jeb->free_size && !jeb->dirty_size && !jeb->wasted_size) {
> > /* If it lives on the dirty_list, jffs2_reserve_space will put it there */
> > D1(printk(KERN_DEBUG "Adding full erase block at 0x%08x to clean_list (free 0x%08x, dirty 0x%08x, used
> > 0x%08x\n",
> > jeb->offset, jeb->free_size, jeb->dirty_size, jeb->used_size));
>
> Indentation is certainly not consistent with kernel coding style.
> Always use a single tab for indentation. Code itself looks sane, but
> I haven't touches jffs2 in a while.
>
> You might want to cross-post things to [email protected] .
> Most jffs2 discussion is happening there or on irc.
>
> David usually doesn't take patches, so you have to find someone else
> to check things into cvs or convince David to give you cvs access.
> Don't ask me, I don't speak ipv6 and the cvs server doesn't speak ipv4
> anymore.
>
> Jörn
>
> --
> It's not whether you win or lose, it's how you place the blame.
> -- unknown
--
Estelle Hammache
Terminal Management Team (Mobile phones MCU Software Development)
TINA : 044 8024
Phone : (+33) 1 58 07 80 24
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to [email protected]