On Tuesday 01 February 2011 10:12:59 黄柏一 wrote:
> Hi all,
>
> i have some confused about the time in yaffs2. I want to know want kind of
> metadata or function record the create_time, update_time, delete_time for a
> object.Thank you guys.
Hello Alex
Yaffs has two types of metadata:
1) Tags: These are a few bytes per "chunk" that tell us which chunks fit where
in a file. Each tag is of the form object Id and chunk Id.
2) Object Header: This is chunk 0 in an object (ie file directory, etc). The
object header holds various information about the object including the name,
permissions, times etc.
When a file is written and flushed or closed a new object header is written
and the old one becomes garbage.
When a file is renamed a new file object header is written and the old object
header is deleted.
Object headers are written by the function yaffs_update_oh().
-- Charles