Failed to garbage collect: ENOSPC

joris.lammers at pandora.be joris.lammers at pandora.be
Wed Mar 10 13:08:08 EST 2004


Hello,

We are using jffs2 on a PowerPC board with four AM29LV128 flashes on it. There are 3 jffs2 partitions on the flash and one of the smaller ones (4MB in size) contains the log files (and their rotated counterparts).

If we log intensively to one of the files and reset the board after a random uptime, it sometimes occurs the partition gets full (97% use, 124k free reported by df) and any write to the partition fails with error ENOSPC. If I then turn on debugging of the jffs2 code I get the following error: "dirty size 0x0001BC38 + unchecked_size 0x00000000 < nospc_dirty_size 0x20000, returning -ENOSPC).

Only way to get out of this is to remove the log file that was written to most. This file is then about 200kB in size but after removal the free space of the partition grows from 124kB to 2MB! Apparently there was dirty space to collect?

What's causing the garbage collector to fail during a write? Where is all that dirty space gone? What's the difference between a remove and a write.

We are using the MTD snapshot of 29 February 2004.

Thanks in advance,
Joris





More information about the linux-mtd mailing list