jffs2 on Ecos: multi task access and defragmentation

David Woodhouse dwmw2 at infradead.org
Fri Oct 24 03:48:22 EDT 2003


On Thu, 2003-10-23 at 10:52 +0100, Armelle Potier wrote:
> 2 questions:
> 1 - How must be used jffs2 with many task calling it for read-write-erase
> operations on different or same files or directory
> Is it managed correctly by jffs2 and how (tasks blocked if necessary for
> example) or have the task to care for multi access and then how?

JFFS2 does locking internally, using semaphore and spinlock primitives
under Linux.

In the eCos build, I believe those locking primitives should also work;
they're mapped to mutexes (mutices?) and NOP respectively -- but they're
largely untested because the eCos tests so far have all been
single-threaded.

> 2 - does jffs2 need defragmentation functionnality ? If yes how to use this
> service if it's exist.

JFFS2 doesn't need defragmentation. However, if you're using a
thread-capable build of eCos you could usefully implement the background
garbage collection thread for eCos. Take a look at background.c and make
a background-ecos.c which does something similar.

-- 
dwmw2




More information about the linux-mtd mailing list