This formatting is very hard to read. Can you please send plain text in the future. Please also do not call what you have done "yaffs2" since this already has a meaning. What you are trying here is to modify yaffs to support 2k pages. There is much more to yaffs2 than that. Some comments in line below. On Wednesday 21 April 2004 19:50, SW_LEE wrote: > Dear all,
>
> I am using the yaffs to implement yaffs2 supporting 16Bit,2K page
> Even if reading the yaffs2 spec, I can't fully understand it.
> And decided to expand yaffs1 with easeness for yaffs2.
> Currently, I re-defined
> yaffs_tags
> __u32 chunkid;
> __u32 objectid;
> __u32 serialnumber
> __u16 pad1;
> unsigned ecc:12;
> unsigned ecc2:12;
> unsinged pad:8;
> Total tags size is 20 bytes.
I do not understand why you want to modify this. the tags ecc is only for the tags, not the data. > Surely SPARCE size is 64 bytes.
Yes it is for 2k pages. > Yaffs_spare structure has
> 26byte ecc value: 2 byte blockstatus, 2 byte page stuatus, 20 byte tags. No it does not, it has 3 bytes of ECC per 256 bytes. >
I tried to make litte modificatoin to yaffs original source code and > tested as like the followings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1.MTD Driver -- read/write O.K tested by mtdchar, ext2 file system.
> 2.yaffs2
> A.read : directory, file reading is ok
> B.write :, when creating new files ,kernel crashed..
>
>
> Craching Point
> asmlinkage long sys_open --> filp_open(tmp, flags, mode)
> --> fd_install(fd, f);
>
> fd_install(unsigned int fd, struct file * file)
> {
> struct files_struct *files = current->files;
> write_lock(&files->file_lock);
> if (files->fd[fd]) BUG(); <---- I have the Problems
> files->fd[fd] = file;
> write_unlock(&files->file_lock);
> }
>
Part of the reason could be that yaffs uses the stack for temporary pages. That works for 512byte pages. But with 2k pages the kernel stack might be corrupted since, (if I recall correctly) the kernel uses an 8k stack. YAFFS2 does not use this, but uses a buffer pool that is allocated with kmalloc(). > linux-2.4.18-rmk7
> I don't think that linux-2.4.18-rmk7 has the problems of sys_open > /fd_install.
But yaffs1 works fine in linux-2.4.18-rmk7 and my yaffs2 > uses exactly same code to connect between yaffs2 and VFS.(I guess..)
>
> My test example is
> Shell> cd yaffs2_dir
> Shell> echo "1" > some_file
> Sys_open-> filp_open .... yaffs_lookup .. a yaffs_create ( until this, I > have no problems)
-->fd_install (crash. > Currents->files->fd[fd] has wrong value)

> Thanks in advance.
>
> SW.LEE
>
>
>
>
>
>
>
>
>
>
>
>
>
> > >

> > > > > > >
background='http://image.hanmail.net/hanmail/general/dotline_sim.gif' > height=1>
"¿ì¸® > ÀÎÅͳÝ, Daum" color="#312400">http://www.daum.net  ¡ºÆò»ý¾²´Â ¹«·á > ÇѸÞÀϳݡ»
> style="border: #ECECEC solid 1px;"> > > > > > >
href='http://premium-service2.daum.net/' target=_blank> src='http://image.hanmail.net/hanmail/top/adver/pri_footer.gif' width=40 > height=40 border=0> style="line-height:140%; font-size:9pt;"> href='http://premium-service2.daum.net' target=_blank> style="font-size:9pt;">ÇÁ¸®¹Ì¾ö ¸ÞÀÏ ½áº¸¼Ì¾î¿ä?
ºü¸¥ > Àü¼Û,Æí¸®ÇÑ ±â´ÉÀÇ ³ª¸¸ÀÇ °íÇ°°Ý ¸ÂÃã ¸ÞÀÏ!
src='http://image.hanmail.net/hm/line_h.gif' width=3 height=40> width=50% class=base style="line-height:140%; font-size:9pt;"> href='http://hmm.daum.net/footer_ad' target=_blank> src='http://mailimg.hanmail.net/evt/footer/footer_20040302.gif' width='350' > height='40' border='0' align='absmiddle'>
> > > > > > > > > > > src="http://wwl330.hanmail.net:4280/@from=hitchcar&rcpt=yaffs%40toby%2Dchur >chill%2Eorg&msgid=%3C20040421165003%2EHM%2E000000000006Ukr%40wwl330%2Ehanmai >l%2Enet%3E"> > > --------------------------------------------------------------------------- >------------ This mailing list is hosted by Toby Churchill open software > (www.toby-churchill.org). If mailing list membership is no longer wanted > you can remove yourself from the list by sending an email to > yaffs-request@toby-churchill.org with the text "unsubscribe" (without the > quotes) as the subject. --------------------------------------------------------------------------------------- This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org). If mailing list membership is no longer wanted you can remove yourself from the list by sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" (without the quotes) as the subject.