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

Top Page
Attachments:
Message as email
+ (text/html)
Delete this message
Reply to this message
Author: SW_LEE
Date:  
To: yaffs
Subject: [Yaffs-archive] [Question]when making yaffs2..
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.
Surely SPARCE size is 64 bytes.
Yaffs_spare structure has
26byte ecc value: 2 byte blockstatus, 2 byte page stuatus, 20 byte tags.
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);
}

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





















"우리 인터넷, Daum" http://www.daum.net  『평생쓰는 무료 한메일넷』






프리미엄 메일 써보셨어요?빠른 전송,편리한 기능의 나만의 고품격 맞춤 메일!



















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