Hello,
I tried YAFFS yesterday on a real NAND flash device of my SA1110 based ARM
board. I found the following problems:
1.
After creating a new directory, first 'cd' fails ( kernel dump ) and kills my
shell, later I can change the directory fine.
Fix: Added a dget_locked(dentry) with the locking/unlocking necessary and
FIXED!! Have you already tried this way ? I found in the source code, there
were some efforts to solve this problem before.
Here we are the 'chunk' added to yaffs_lookup:
if(inode)
{
T((KERN_DEBUG"yaffs_loookup looks good\n"));
// try to fix ln -s prob dget(dentry); // try to solve directory bug
>>>>>>>> spin_lock(&dcache_lock);
>>>>>>>> dget_locked(dentry);
>>>>>>>> spin_unlock(&dcache_lock);
d_add(dentry,inode);
yaffs_GrossUnlock(dev);
return dentry;
}
( dget() was not correct, because it fails if the d_count zero. )
2.
Strange behaviour about device nodes ( special files )
I've found a "copt/paste editing' bug in yaffs_guts.c.
MknodSpecial function created a DIRECTORY type object on the flash.
I changed to SPECIAL. See below:
yaffs_Object *yaffs_MknodSpecial(yaffs_Object *parent,const char *name, __u32
mode, __u32 uid, __u32 gid, __u32 rdev)
{
return
yaffs_MknodObject(YAFFS_OBJECT_TYPE_SPECIAL,parent,name,mode,uid,gid,NULL,NULL,rdev);
}
I'll try it soon, I hope helps. Reporting later ...
Andras Toth
Senior Software Engineer
Guardware Systems Ltd.
Budapest, Hungary
---------------------------------------------------------------------------------------
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.