[Yaffs-archive] Re: [Question]when making yaffs2..

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: SW_LEE, yaffs
Subject: [Yaffs-archive] Re: [Question]when making yaffs2..
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,<br>
> <br>
> I am using the yaffs to implement yaffs2 supporting 16Bit,2K page <br>
> Even if reading the yaffs2 spec, I can't fully understand it. <br>
> And decided to expand yaffs1 with easeness for yaffs2. <br>
> Currently, I re-defined <br>
> yaffs_tags <br>
> __u32 chunkid; <br>
> __u32 objectid; <br>
> __u32 serialnumber <br>
> __u16 pad1; <br>
> unsigned ecc:12; <br>
> unsigned ecc2:12; <br>
> unsinged pad:8; <br>
> Total tags size is 20 bytes. <br>


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. <br>


Yes it is for 2k pages.

> Yaffs_spare structure has <br>
> 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.

> <br> I tried to make litte modificatoin to yaffs original source code and
> tested as like the followings: <br> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br>
> 1.MTD Driver -- read/write O.K tested by mtdchar, ext2 file system. <br>
> 2.yaffs2 <br>
>    A.read : directory, file reading is ok <br>
>    B.write :, when creating new files ,kernel crashed..<br>
> <br>
> <br>
> Craching Point <br>
> asmlinkage long sys_open --&gt; filp_open(tmp, flags, mode) <br>
> --&gt; fd_install(fd, f); <br>
> <br>
> fd_install(unsigned int fd, struct file * file) <br>
> { <br>
> struct files_struct *files = current-&gt;files; <br>
> write_lock(&amp;files-&gt;file_lock); <br>
> if (files-&gt;fd[fd]) BUG(); &lt;---- I have the Problems <br>
> files-&gt;fd[fd] = file; <br>
> write_unlock(&amp;files-&gt;file_lock); <br>
> } <br>
> <br>


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 <br>
> I don't think that linux-2.4.18-rmk7 has the problems of sys_open
> /fd_install. <br> 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..) <br>
> <br>
> My test example is <br>
> Shell&gt; cd yaffs2_dir <br>
> Shell&gt; echo &quot;1&quot; &gt; some_file <br>
> Sys_open-&gt; filp_open .... yaffs_lookup .. a yaffs_create ( until this, I
> have no problems) <br> --&gt;fd_install (crash.
> Currents-&gt;files-&gt;fd[fd] has wrong value) <br> <br>
> Thanks in advance.<br>
> <br>
> SW.LEE<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <!--DzÅÍ µðÆúÆ®-->
>
> <br><br>
> <table border=0 cellpadding=5 cellspacing=0 width=100%>
>         <tr>
>                 <td
> background='http://image.hanmail.net/hanmail/general/dotline_sim.gif'
> height=1></td> </tr>
>         <tr>
>                 <td><font color="#312400" style="font-size:9pt;">"¿ì¸®
> ÀÎÅͳÝ, Daum" <a href=http://www.daum.net target=_top><font
> color="#312400">http://www.daum.net</font></a>&nbsp;&nbsp;¡ºÆò»ý¾²´Â ¹«·á
> ÇѸÞÀϳݡ»<br> </font></td>
>         </tr>
> </table>
> <table bgcolor=#F8F8F8 border=0 cellpadding=3 cellspacing=0 width=100% 
> style="border: #ECECEC solid 1px;"> <tr>
>                 <td width=50 align=right nowrap><a
> href='http://premium-service2.daum.net/' target=_blank><img
> src='http://image.hanmail.net/hanmail/top/adver/pri_footer.gif' width=40
> height=40 border=0></a></td> <td width=50% class=base
> style="line-height:140%; font-size:9pt;"><a
> href='http://premium-service2.daum.net' target=_blank><font color=#BD8000
> style="font-size:9pt;">ÇÁ¸®¹Ì¾ö ¸ÞÀÏ ½áº¸¼Ì¾î¿ä?</font></a><br>ºü¸¥
> Àü¼Û,Æí¸®ÇÑ ±â´ÉÀÇ ³ª¸¸ÀÇ °íÇ°°Ý ¸ÂÃã ¸ÞÀÏ!</td>

>
>
>
>                 <td width=3 nowrap><img
> src='http://image.hanmail.net/hm/line_h.gif' width=3 height=40></td> <td
> width=50% class=base style="line-height:140%; font-size:9pt;"><a
> href='http://hmm.daum.net/footer_ad' target=_blank><img
> src='http://mailimg.hanmail.net/evt/footer/footer_20040302.gif' width='350'
> height='40' border='0' align='absmiddle'></a></td> </tr>
> </table>

>
>
>
>
>
>
>
>
>
>
> <img
> 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
> 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 with the text "unsubscribe"
(without the quotes) as the subject.