20 Feb 2012 12:42
jffs2 garbage collect thread
Stanislav Meduna <stano <at> meduna.org>
2012-02-20 11:42:13 GMT
2012-02-20 11:42:13 GMT
Hi,
anyone knows whether it is now safe to enable the JFFS2 garbage
collect thread?
The CDL comment says:
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.
The icache locking probably is not thread-safe per-se, but
the fs-ecos.c says
FSTAB_ENTRY(jffs2_fste, "jffs2", 0,
CYG_SYNCMODE_FILE_FILESYSTEM | CYG_SYNCMODE_IO_FILESYSTEM,
and the thread itself does cyg_fs_lock around the garbage
collect pass
cyg_fs_lock(mte, mte->fs->syncmode);
if (jffs2_garbage_collect_pass(c) == -ENOSPC) {
printf("No space for garbage collection. "
"Aborting JFFS2 GC thread\n");
break;
}
cyg_fs_unlock(mte, mte->fs->syncmode);
(Continue reading)
RSS Feed