JFFS2 Problem

Frederic Giasson fgiasson at mediatrix.com
Thu Jul 11 09:29:00 EDT 2002


This reminds me of a problem which I think was fixed a long time ago
(probably around the end of July 2001).  I was copying and erasing
repeateadly a certain amount of small files and subdirectories, and free
space reported by "df" was constantly decreasing. The memory leak was
occuring upon directories deletion, the metadata was remaining on the flash.
The fix was done in clear_inode() function. 

If you are using an old version of JFFS2, maybe the fix was not present.
Originally, the patch was done in function jffs2_clear_inode(), file
readinode.c.  It has been moved to function jffs2_do_clear_inode() -
readinode.c:

	if (f->metadata) {
		if (!f->inocache->nlink)
			jffs2_mark_node_obsolete(c, f->metadata->raw);
		jffs2_free_full_dnode(f->metadata);
	}

Look in file readinode.c.  If you don't see the above code, you could try to
update you JFFS2 code and then look if the problem is gone.  If the fix is
in your code and the problem is still present, then I would appreciate if
you could explain to me how to reproduce your problem.

Frédéric Giasson 







More information about the linux-mtd mailing list