Re: [Yaffs] architecture problem with yaffs2 scanBackwards

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Charles Manning
日付:  
To: yaffs
題目: Re: [Yaffs] architecture problem with yaffs2 scanBackwards
On Thursday 11 December 2008 01:53:58 Cal Page wrote:
> yaffs2 runs fine forever as long as I mount/dismount, but if I crash, it
> scrambles the file system.
>
> Specifically, garbage collection that moves chunks out of blocks re-tags
> the chunk with its new sequenceNumber.

It is supposed to do that.

Try reading http://users.actrix.co.nz/manningc/yaffs/HowYaffsWorks.pdf

> Then, if the system crashes,
> scanBackwards will receive this moved chunk out of order.


The order that matters is time order, not physical order.

The sequence numbers are used to identify the order in which the logs were
written and allow us to "replay history" to rebuild the file system state.

When a garbage collection happens, live data on the block is copied out and is
reassigned with the new sequence number. Since it now has a more recent
sequenceNumber, the ScanBackwards() will encounter it sooner.


>
> Typically, I get a lot of files in lost+found.


Can you do an "ls-ial" on lost+found and include that.

This sounds very much like the tags are getting mashed by the mtd layer or mtd
interfacing.

I suggest you do some simple verifications to ensure that the tags are getting
saved and restored properly.

-- CHarles