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

Re: JFFS question: Can I forcibly trigger a garbage collect?

On 12 Oct 2001, Ujwal S. Sathyam wrote:
> However, after a few transfers back and forth of the same binaries,
> usage climbs to 88%, even though there are no additional files. Is there
> a way to force a garbage collect? I looked in os/linux/fs/jffs and saw a
> function jffs_garbage_collect_now(). Is there an interface to that in
> user-land? I guess I don't really need this because jffs will garbage
> collect on demand, but I am curious.

You don't need it, and you should not do it (since it will shorten the
flash lifetime if you collect unnecessarily often).

However you should be able to trig it from usermode, but I don't think
such an ioctl exists in JFFS1.

> I also noticed that after several file transfers using ftp and automatic
> garbage collection, df reports > 100% usage:
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/flash2                448       464        -1 104% /mnt/flash
> tmpfs                      872        64       808   7% /var
> Is this something I should report on the jffs list?

I think JFFS1 is legacy by now, and what you should use is JFFS2. But feel
free to report it anyway of course.