[prev in list] [next in list] [prev in thread] [next in thread]
List: yaffs
Subject: Re: [Yaffs] =?utf-8?q?how_sheckpoint_works=EF=BC=9F?=
From: Charles Manning <manningc2 () actrix ! gen ! nz>
Date: 2011-11-23 0:33:02
Message-ID: 201111231333.03127.manningc2 () actrix ! gen ! nz
[Download RAW message or body]
On Wednesday 16 November 2011 16:20:47 å¼ ç£Š wrote:
> i'm reading the yaffs2's sourcecode,and i'm puzzling about the check point
> mechnism.
> 1.in struct yaffs_dev ,it's member checkpt_buffer,it seems storing
> checkpoint data,and checkpt_byte_offs stores the offset of each check point
> data.(i'm right?) in funciton write checkpoint to yaffs_dev and read
> checkpoint from yaffs_dev,after write/read check point
> data,checkpt_byte_offs always increace, this is why i'm puzzling,can
> someone tell me why,thank very much.
The checkpoint data is read or written as a stream. The checkpoint buffer is
just a buffer used to hold the data to build up page aligned data. See the
functions in yaffs_checkptrw.c.
> 2.as the checkpoint data is not write to flash immediately,if suddenly the
> device lost power and the checkpoint has not been synchronized while many
> successful opeartion has down.then reboot the device ,how does yaffs2 work?
> use the checkpoint data to recover or scan flash to recover? and how
> yaffs2 detectes?
If there is no valid checkpoint then yaffs scans the flash instead. This is
detected by not finding any, or enough, checkpoint data when reading the
checkpoint.
-- Charles
_______________________________________________
yaffs mailing list
yaffs@lists.aleph1.co.uk
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic