Right. As far as I remember, if a file is deleted, a new header chunk is written with parent folder being the unlinked folder (I think folder with object id 3 or something, check source and docs to verify). If a header or data chunk is updated, it is just rewritten somewhere else. Since yaffs2 is a log structured filesystem, you always know the order each chunk was written. Blocks are allocated one by one in an orderly fashion, and each OOB has the block id written, and the block id increments for each allocated bock. Within a block, the chunks are written sequentially. So looking at block id and location within a block, you can always know which chunk was written last. So if you find the same chunk of the same file (aka object) many places, it's always the one that was written last that is valid. Cheers, Ketil 2011/2/15 HuangAlex : > Hi, > > I have read the document and i can not find a answer. So in yaffs2, if a > delete or update happen, is it just put the file to "unlink" directory? > There is no any other change in metadata in tags? > > Baiyi > >> Date: Tue, 15 Feb 2011 18:54:37 +0100 >> Subject: Re: [Yaffs] Question about metadata for delete and update >> From: ketil@froyn.name >> To: by_pacific@hotmail.com >> CC: yaffs@lists.aleph1.co.uk >> >> Hi, >> >> You mention the deleted bit. This was only in use with yaffs version >> 1, and yaffs2 does not use a deleted bit any more. Are you really >> using yaffs1? >> >> If you're curious about how stuff works, check out the "How Yaffs >> Works" document: >> >> http://www.yaffs.net/files/yaffs.net/HowYaffsWorks.pdf >> >> It helped me understand quite a lot. >> >> Cheers, Ketil >> >> 2011/2/15 HuangAlex : >> > Hi, >> > >> > Here I have a question about the metadata for delete and update the >> > files in >> > yaffs. I know if we delete or update a file before garbage collection in >> > yaffs, some pages will have the obsolete bit marked,so what is the >> > exactly >> > metadata to mark as obsolete? And is there any difference for that >> > metadata >> > between update and delete? Thank you all. >> > >> > >> > >> > Baiyi >> > >> > _______________________________________________ >> > yaffs mailing list >> > yaffs@lists.aleph1.co.uk >> > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs >> > >> > >> >> >> >> -- >> Ketil Froyn >> ketil@froyn.name >> http://ketil.froyn.name/ > -- Ketil Froyn ketil@froyn.name http://ketil.froyn.name/