data loss on jffs2 filesystem on dataflash
Artem B. Bityutskiy
dedekind at yandex.ru
Wed Sep 21 11:59:04 EDT 2005
Peter Menzebach wrote:
> Ok, Ok, now I am digging a bit....
> with some more printfs, I now looked a bit clearer, and have another
> question:
> when jffs2_flush_wbuf is called, how is this area now markes as written.
> Sometimes later jffs2_do_reserve_space is called an returns the same
> address, which was written to flash....
>
The space is accounted by corresponding fields in jffs2_eraseblock
structure: free_size, wasted_size, used_size.
Jffs2 always writes to c->sector_size - jeb->free_size.
The corresponding place in jffs2_flush_wbuf, where the parameters a
adjusted is wbuf.c:506.
But.. Argh! Look at line 488: if (pad && !jffs2_dataflash(c))
Why !jffs2_dataflash(c)??? I bet this is the bug.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the linux-mtd
mailing list