On Wednesday 01 June 2011 15:05:07 yy xuye wrote:
> >If a file has been deleted then last entry for that file in the log will
> > be
>
> the deletion record
> What's the feature of the "deletion record"? I searched the flash data, and
> found some headers with name "deleted" parent 0x04 or "unlink" parent 0x03.
> I supposed these to be the "delettion record". Is it so?
Sorry about the use opf confusing terminology.
Yes, you are correct. The deletion is recorded by the object header that
places the file in the deleted or unlinked directory. The name itself is not
actually important.
> BR.
>
> On Wed, Jun 1, 2011 at 10:41 AM, Charles Manning
<
manningc2@actrix.gen.nz>wrote:
> > On Wednesday 01 June 2011 14:05:18 yy xuye wrote:
> > > > If the last entry for the object is a deletion record then we know
> > > > the
> > >
> > > file was deleted.
> > >
> > > So we'll find "file2" then "deleted" then "file1", but not "deleted"
> > > then "file2" then "file1", right?
> > > BR.
> >
> > If a file has been deleted then last entry for that file in the log will
> > be the deletion record. Since yaffs2 scans backwards, that will be the
> > first entry encountered. The scanning will thus know that this file is
> > deleted and
> > further data or object headers associated with that file can be ignored.
> >
> > > On Wed, Jun 1, 2011 at 9:31 AM, Charles Manning
> >
> > <manningc2@actrix.gen.nz>wrote:
> > > > On Wednesday 01 June 2011 13:10:20 yy xuye wrote:
> > > > > Dear all,
> > > > > I read the file "HowYaffs works", but there is a detail description
> > > > > about this.
> > > > > For example, i create a file with object id 0x46d, then i delete
> > > > > it. Now it will add object named "deleted" with object id 0x46d
> > > > > parent id
> >
> > 3
> >
> > > > > or 4, right?
> > > >
> > > > Yes.
> > > >
> > > > > Will it reallocate the object id 0x46d to a new object later?
> > > >
> > > > It will only reuse that object Id once the old file has been deleted.
> > > > This might change in the future.
> > > >
> > > > > If so, when scanning the flash data, how to judge the new file with
> >
> > obj
> >
> > > > > id=0x46d is deleted or not?
> > > >
> > > > Since yaffs is log structured we know the order in which things
> >
> > happened.
> >
> > > > yaffs scans backwards in time so the last thing that happened is
> >
> > scanned
> >
> > > > first. If the last entry for the object is a deletion record then we
> >
> > know
> >
> > > > the
> > > > file was deleted.
> > > >
> > > > In the future object Ids might be reused, but then we would see a
> >
> > history
> >
> > > > that
> > > > shows the new file info after the old file info so it can be told
> >
> > apart.
> >
> > > > -- Charles
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > yaffs mailing list
> > > > yaffs@lists.aleph1.co.uk
> > > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs