public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Vrabel <dvrabel@arcom.co.uk>
Cc: mtd@infradead.org, jffs-dev@axis.com
Subject: Re: JFFS: free_size == 0 after mounting
Date: Wed, 23 Aug 2000 12:30:56 +0100	[thread overview]
Message-ID: <29404.967030256@cygnus.co.uk> (raw)
In-Reply-To: <39A39051.CAF6DA66@arcom.co.uk>


dvrabel@arcom.co.uk said:
>  I'm using the latest CVS JFFS and get endless
>    jffs_garbage_collect_thread(): free_size == 0. This is BAD.
> messages after mounting.

> I have images of the flash if anyone is interested. 

Thanks. cvs update and break it again :)

Index: intrep.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/intrep.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- intrep.c	2000/08/22 09:32:28	1.67
+++ intrep.c	2000/08/23 11:27:35	1.68
@@ -10,7 +10,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * $Id: intrep.c,v 1.67 2000/08/22 09:32:28 dwmw2 Exp $
+ * $Id: intrep.c,v 1.68 2000/08/23 11:27:35 dwmw2 Exp $
  *
  * Ported to Linux 2.3.x and MTD:
  * Copyright (C) 2000  Alexander Larsson (alex@cendio.se), Cendio Systems AB
@@ -644,6 +644,16 @@
 			   a single kernel thread will fix the original problem.
 			*/
 			if ((__u32) pos % fmc->sector_size) {
+				/* If there was free space in previous 
+				   sectors, don't mark that dirty too - 
+				   only from the beginning of this sector
+				   (or from start) 
+				*/
+				if (start < (pos & ~(fmc->sector_size-1))) {
+					D1(printk("Reducing start to 0x%x from 0x%x\n", pos & ~(fmc->sector_size-1), start));
+					start = pos & ~(fmc->sector_size-1);
+				}
+				D1(printk("Dirty space: 0x%x for 0x%x bytes\n", start, (pos - start)));
 				jffs_fmalloced(fmc, (__u32) start,
 					       (__u32) (pos - start), 0);
 			}


--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

      reply	other threads:[~2000-08-23 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-23  8:50 JFFS: free_size == 0 after mounting David Vrabel
2000-08-23 11:30 ` David Woodhouse [this message]

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=29404.967030256@cygnus.co.uk \
    --to=dwmw2@infradead.org \
    --cc=dvrabel@arcom.co.uk \
    --cc=jffs-dev@axis.com \
    --cc=mtd@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