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

SW_LEE hitchcar@hanmail.net
Wed, 21 Apr 2004 16:50:03 +0900 (KST)


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>
Surely SPARCE size is 64 bytes. 
<br>
Yaffs_spare structure has 
<br>
26byte ecc value: 2 byte blockstatus, 2 byte page stuatus, 20 byte tags. 
<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>
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%2Dchurchill%2Eorg&msgid=%3C20040421165003%2EHM%2E000000000006Ukr%40wwl330%2Ehanmail%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.