[Yaffs] Yaffs goes bad when flash is completelly full

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Sharanu TURAMARI
日付:  
To: yaffs
題目: [Yaffs] Yaffs goes bad when flash is completelly full

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