Ian McDonnell,
  I get yaffs2 working without ECC tags ( struct (yaffs_ECCOther) ).
Now, yaffs2 only takes 12 bytes of Nand spare area, and our HWECC
has enough space to store 36 bytes of parity code.  Thanks!
 
btw, I add a config in 'Kconfig' to choose if we want to ignore ECC tags.
And, how can I post a patch on the list? simply add the patch file in the mail?
 
-He Yong

2007/7/3, Ian McDonnell <ian@brightstareng.com>:
He Yong,

On Saturday 30 June 2007 02:24, He Yong wrote:
> Hello,all
> I'm using yaffs2 on Linux 2.6.20, our hardware supports
> Reed-Solomon ECC Accelerator.
> the HWECC generates 9-bytes of parity code for each 512 Bytes
> of data. So , in a 2K page,
> the ECC parity code will take 36 bytes, and there're only 28
> bytes left for Yaffs2.
> I found that yaffs2 need 32 bytes of Spare space, is that
> possible yaffs2 use less than 32 bytes? or
> I need to give up using HWECC...

The Yaffs2 (large-page) tags format is not very economical. As
far as I can tell the struct that holds the 'mini' ECC for the
tags metadata could be reduced to just 3 bytes. The current
struct (yaffs_ECCOther) has an unsigned char and two unsigned
ints, which makes it 12 bytes on most architectures. The ECC
code looks to be only use/need byte-sized quantities. See
yaffs_packedtags2.h, yaffs_ecc.h, yaffs_ecc.c,
yaffs_packedtags2.c.

If you try it and get it working, please be sure to post a patch
to the list.

-imcd



--
Best Regards!

He Yong

School of Information Security,
Shanghai Jiaotong University,
Dong cuan Road #800,
Minhang, Shanghai, P.R.China