Yaffs goes bad when flash is completelly full,yaffs文件系统在空间占满后,出现错误

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值