[Yaffs] Question about Using Spare Area of NAND Flash in YAFFS2

rong shawn shawn.rong at gmail.com
Fri Jul 7 04:33:37 BST 2006


Hello all,

When I traced code of function *yaffs_scan()* in YAFFS2 source code:

----------------------------------------------------------------

yaffs_Scan -> yaffs_QueryInitialBlockState -> nandmtd2_QueryNANDBlock ->
nandmtd2_ReadChunkWithTagsFromNAND

----------------------------------------------------------------

In function *nandmtd2_ReadChunkWithTagsFromNAND()*, it writes:

----------------------------------------------------------------

       yaffs_PackedTags2 pt;

       ……

       if(tags)

              retval =
mtd->read_oob(mtd,addr,mtd->oobsize,&dummy,dev->spareBuffer);

       ……

       memcpy(&pt,dev->spareBuffer,sizeof(pt));
----------------------------------------------------------------


Value of "sizeof(pt)" is 32Bytes. So I have 2 questions:

1.       Do the forhead 32B data stored in spare area of each page of NAND
Device can 1-1 map to member variables of structure yaffs_PackedTags2?

2.       For small page NAND Device, there are *ONLY* 16B for spare area,
how could execute

memcpy(&pt,dev->spareBuffer,sizeof(pt));

for them?
Does YAFFS2 can only support Large-Page NAND?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aleph1.co.uk/pipermail/yaffs/attachments/20060707/0cbe61d7/attachment.html


More information about the yaffs mailing list