yaffs2的文件系统,在文件空间占满后,如果依然不停的写文件,则会在一段时间后出现文件系统的错乱,文件名出现乱码的现象,日志可能出现 yaffs tragedy: no more eraased blocks
!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!。Charles Manning已经fix这个问题在
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/yaffs_guts.c?r1=1.85&r2=1.86 。下面是邮件列表的相关信息。
From: Sharanu TURAMARI <sharanu.turamari@ziilabs.com >
Date: 2009/7/21
To: yaffs@lists.aleph1.co.uk
Hi,
I am facing the problem with latest yaffs2 port when the whole flash space
is occupied.
I am following the below procedure:
- Copy the entire root contents to flash using "find bin boot dev etc home
init lib media sbin tmp usr var | cpio -pdum /flash" command
- Recursively copy the contents of flash to different directories in flash
using "cp -rf * sd0" etc until the flash usage gets 100% and the "
dev->nErasedBlocks" is 0.
- After sometimes I am getting "Allocator out " problems.
- Here onwards flash is completelly unusable since even deletion fails and
only formatting will help.
Thoughts that come to mind is:
- Though nReservedBlocks is 5 , why yaffs is using all the blocks and
getting dev->nErasedBlocks as 0.
- I am seeing yaffs_GarbageCollectBlock() is using one more fresh erased
block in the routine yaffs_WriteNewChunkWithTagsToNAND() it calls when it
is either a data chunk in live file or an Object header.
So, instead of producing blocks it is consuming a block which explains
that whenever that condition occurs a block is being lost.
- Though the nReservedBlocks is 5 , I am not seeing any restrictions on
the block allocation if it reaches below 5.
- Just for experimentation , I hacked to use reserved blocks only
yaffs_GarbageCollectBlock()-> yaffs_WriteNewChunkWithTagsToNAND() , and
other allocations not use it. Thought there it is stopping
when dev->nErasedBlocks is 8 and no "Allocator out" problems, still flash
is unusable as not able to delete any file and increase free space usage.
- I am not seeing any erase problem since each yaffs_GarbageCollectBlock()
is producing one erased block which is consumed immediately.
- If anybody has done the same experimentaion with yaffs ,please help me to
solve this.
Rgds,
Sharanu
_______________________________________________
yaffs mailing list
yaffs@lists.aleph1.co.uk
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
----------
From: Charles Manning <manningc2@actrix.gen.nz >
Date: 2009/7/22
To: yaffs@lists.aleph1.co.uk
I have been able to recreate this problem and am looking at it now.
Thanks to Sharanu for his persistence in pointing this out.
-- CHarles
----------
From: Charles Manning <manningc2@actrix.gen.nz >
Date: 2009/7/28
To: yaffs@lists.aleph1.co.uk
Please try the latest cvs.
http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs2/yaffs_guts.c?r1=1.85&r2=1.86
-- CHarles
----------
From: Sharanu TURAMARI <sharanu.turamari@ziilabs.com >
Date: 2009/7/28
To: Charles Manning <manningc2@actrix.gen.nz >
Cc: yaffs@lists.aleph1.co.uk
Hi Charles,
Applied the fix and everything is fine now.
Thanks for the quick and apt fix.
Rgds,
Sharanu