* Garbage collection problem for nand flash
@ 2003-11-17 10:21 Kevin Liao
2003-11-17 10:32 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Liao @ 2003-11-17 10:21 UTC (permalink / raw)
To: linux-mtd
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
/dev/mtd2
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
/mnt/config
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.
Regards,
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Garbage collection problem for nand flash
2003-11-17 10:21 Garbage collection problem for nand flash Kevin Liao
@ 2003-11-17 10:32 ` David Woodhouse
2003-11-17 14:06 ` Kevin Liao
0 siblings, 1 reply; 4+ messages in thread
From: David Woodhouse @ 2003-11-17 10:32 UTC (permalink / raw)
To: Kevin Liao; +Cc: linux-mtd
On Mon, 2003-11-17 at 18:21 +0800, Kevin Liao wrote:
> 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.
It's a harmless complaint which can probably just be disabled. A short
while after you write to the flash, we decide to flush the write-buffer.
We prefer to do that by garbage-collection rather than just by padding
it out with zeroes.... but as the message says, there's nothing to GC
from. So we pad it instead.
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Garbage collection problem for nand flash
2003-11-17 10:32 ` David Woodhouse
@ 2003-11-17 14:06 ` Kevin Liao
2003-11-17 14:12 ` David Woodhouse
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Liao @ 2003-11-17 14:06 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
But I did not saw such messages when I used the mtd snapshot 20030720 (I
just updated from snapshot 20030720 to 20031112). I also compared the gc.c
with these two snapshots. But I did not found obvious difference in the
functions that issue the complaint, that is jffs2_find_gc_block and
jffs2_garbage_collect_pass. Therefore I still doubt that there may be
something I did wrong. If the mtd utilities I used were based on snapshot
20030720 but the kernel was 20031112, is it possible for such a situation to
happen? Did you have any other suggestion? Thanks a lot.
Regards,
Kevin
----- Original Message -----
From: "David Woodhouse" <dwmw2@infradead.org>
To: "Kevin Liao" <kevinliao@iei.com.tw>
Cc: <linux-mtd@lists.infradead.org>
Sent: Monday, November 17, 2003 6:32 PM
Subject: Re: Garbage collection problem for nand flash
> On Mon, 2003-11-17 at 18:21 +0800, Kevin Liao wrote:
>
> > 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.
>
> It's a harmless complaint which can probably just be disabled. A short
> while after you write to the flash, we decide to flush the write-buffer.
> We prefer to do that by garbage-collection rather than just by padding
> it out with zeroes.... but as the message says, there's nothing to GC
> from. So we pad it instead.
>
> --
> dwmw2
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Garbage collection problem for nand flash
2003-11-17 14:06 ` Kevin Liao
@ 2003-11-17 14:12 ` David Woodhouse
0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2003-11-17 14:12 UTC (permalink / raw)
To: Kevin Liao; +Cc: linux-mtd
On Mon, 2003-11-17 at 22:06 +0800, Kevin Liao wrote:
> But I did not saw such messages when I used the mtd snapshot 20030720 (I
> just updated from snapshot 20030720 to 20031112).
Yes. The code in question was added in August.
> I also compared the gc.c with these two snapshots. But I did not found obvious difference in the
> functions that issue the complaint, that is jffs2_find_gc_block and
> jffs2_garbage_collect_pass. Therefore I still doubt that there may be
> something I did wrong.
The change was made elsewhere, in places which now call those functions
but did not do so before.
--
dwmw2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-11-17 14:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 10:21 Garbage collection problem for nand flash Kevin Liao
2003-11-17 10:32 ` David Woodhouse
2003-11-17 14:06 ` Kevin Liao
2003-11-17 14:12 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox