On Thursday 05 July 2007 00:32, He Yong wrote:
> sorry, I made a mistake. the yaffs2's mini-ecc actually only
> checks the 16 bytes of ext tags (struct
> yaffs_PackedTags2TagsPart).
Yes, I call the tags ecc the "mini-ECC", it is not the main ECC
that covers the user's data. It protects the integrity of the
tags data.
> and generates 9 bytes of parity
> code (struct yaffs_ECCOther). but the sizeof(struct
> yaffs_ECCOther) = 12 byte, simply because the struct is 4-byte
> aligned, I made a little change to save 3 bytes for other
> usage (like mtd bad block mark).
Did you try using unsigned char's in place of the unsigned int's
in struct yaffs_ECCOther, see
http://balloonboard.org/lurker/message/20070702.161336.5e273493.en.html
It should be easy to reduce struct yaffs_PackedTags2 to just 20
bytes: 4 ints + 3 chars + 1 alignment byte -- so only 19 bytes
of real data. This should work without any introducing any
functional differences. The code in yaffs_packedtags2.c uses
sizeof(struct) for the length so I do not think there is any need
to change the i/o code if you can work with 20-byte tags.
-imcd