[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to control JFFS garbage collection?

Is there a way to control JFFS garbage collection? When writing a file to
/dev/flash2 fwrite() often returns ENOSPC when there is still plenty of
space available, especially if I have deleted a file just prior to the write
operations in order to free enough space for the new file. If I pause
between the file delete and the subsequent file write operation then it is
often successful. Success depends on how long I pause. I suspect that the
pause is giving jffs_gcd time to sweep up garbage.

I see that jffs_gcd responds to SIGSTOP and SIGCONT but I need to know when
gc is complete so that I can resume the file write.