[Yaffs] Settings for YAFFS2 & 2k mkyaffsimage

Charles Manning manningc2 at actrix.gen.nz
Wed Jul 20 20:05:22 BST 2005


On Wednesday 20 July 2005 18:12, Chris Williams wrote:
> Thank you all for the various advice.
>
> I've downloaded and plugged in the 2.4.25 code (MTD, JFFS2, and YAFFS2)
> to my kernel, but still no go.
> Before, when data was written, there was no issue with anything until I
> reset the board and MTD redid the bad block test. But with the 2.4.25
> code, if I unmount and remount, the blocks written to show up as bad
> during the YAFFS guts init bit--and again my files have disappeared.

This very much sounds like you still have some weirdness in the mtd though the 
point you raise below could be significant.

"Stuff was there but vanished when I rebooted"  sounds very much like an issue 
with mtd not storing the tags properly. After the remount, look 
at /proc/yaffs. This should tell you a lot more about the state of the 
system.

Please use current YAFFS2.
>
> Also, one bug I had noticed in the CVS code for YAFFS2 that I had been
> using and now in the 2.4.25 code is that in nandmtd2_MarkNANDBlockBad()
> and nandmtd2_QueryNANDBlock(), the MTD functions block_markbad() and
> block_isbad() are being passed the index of the block number to check
> but the MTD code is expecting an offset. I fixed it by changing it from:
>
> -  blockNo
> + blockNo * dev->nBytesPerChunk * dev->nChunksPerBlock

Thanx

Fixed in CVS.

>
> But I have to wonder, since this seems relatively central, if something
> about my settings is causing it use different sections of code than you
> guys. (This was causing the code to think all blocks were bad if the
> first one was--since all of the addresses passed in were contained in
> the first block.)

That could be the case.

What does /proc/yaffs tell you?

Charles




More information about the yaffs mailing list