Garbage collection problem for nand flash

Kevin Liao kevinliao at
Mon Nov 17 05:21:22 EST 2003

Dear all,

I have a nand flash system with one Jffs2 partition on it. The kernel
version is 2.4.18 and the mtd snapshot I use to patch is 20031112. I write
that Jffs2 partition on the nand flash by the following methods:

1. Build a Jffs2 image based on the directory "config" using the command:
mkfs.jffs2 -p -r config -e 16384 -o config.jffs2 -l -n
2. Erase the partition on the nand flash using the command: eraseall -j
3. Write the image to that partition using the command: nandwrite -j
/dev/mtd2 config.jffs2
4. Mount the partition using the command: mount -t jffs2 /dev/mtdblock2

After that, each time I try to touch or modify some file in /mnt/config. The
kernel complains about the following messaes:

jffs2: No clean, dirty _or_ erasable blocks to GC from! Where are they all?
jffs2: Couldn't find erase block to garbage collect!

It seems that the file content is still correct. Does anyone know what's
wrong with it? Thanks a lot.


More information about the linux-mtd mailing list