> > This is a too obvious fault so I'm wondering if its deliberate: > > The structure 'yaffs_ExtendedTags' has 16 unsigned fields > (64bytes) and 2 enum fields (eccResult & extraObjectType). > On a 32bit processor this comes down to a total of 72 bytes > while all the tag/spare bytes must fit into a 64byte space. Extended tags are not written to NAND, they are packed into a suitable structure for writing to NAND.(see yaffs_PackedTags2 and friends) > > This will be easy to fix since some of the fields only needs > a char, but I'm just curious to know why this structure was > defined to be larger than 64B when the standard for NAND > flash spare area is 64 bytes? There is a very valid reason for using a model where the ExtendedTags != the packed tags: 1) The extended tags has info for both yaffs1 and yaffs2 modes of operation and some of the info in extended tags has no equivalent data written to the actual NAND, but is instead determined by software. 2) The extended tags structure alignment is far more CPU efficient (for most CPUs which will be processing YAFFS). Chars etc tend to be inefficient. -- Charles