[ECOS] jffs2 garbage collect

Andrew Lunn andrew@lunn.ch
Wed Sep 20 14:48:00 GMT 2006

On Wed, Sep 20, 2006 at 04:16:43PM +0200, J?rgen Lambrecht wrote:
> Hello,
> this is the comment explaining jffs2 garbage collect:
> # Enable background garbage collection thread, for making
> # free space ahead of time. Leave this off till it's been
> # implemented. And don't implement it till icache locking has
> # been made thread-safe.
> There is garbage collect code in ecos, so I suppost it is implemented.
> And on my ARM7TDMI cpu, I don't have any cache, or is "icache" meaning 
> something like "i-node cache" ?

icache is a jffs2 term, meaning i-node cache. There is a linked list
of inodes kept in memory. At the moment there is no mutex around
operations on this linked list. The eCos fileio code will serialise
access via the file system API so that only one thread will access
JFFS2 at once, but the gc thread does not use this API and so can use
the cache at the same time as normal file system operations. 

Take a look at jffs2_i* functions in fs-ecos.c

> So my question is, can I safely use the garbage collect thread?

No, i think not.


Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list