[Yaffs-archive] RE: YAFFS mkyaffsimage trouble

Charles Manning Charles.Manning@trimble.co.nz
Tue, 3 Sep 2002 09:36:27 +1200


 > After noticing three little gotchas:
> > 1) yaffs_Scan seems to start from the second block not the first (page
32
> > not 0).
> Correct. yaffs does not use block 0. The reason for this is that the
> Tnode values (used to find the chunks in the file) are only 16 bits and 0
is
> used to indicate an empty Tnode. Thus, there is no way to access a chunkId
of
> value 0 (ie the first page). Allowing partial use of  block zero would
> complicate the allocation logic. Hence the weasel way out: yaffs does not
use
> block 0.
>
>Ok. Nice to know the reason. Does this mean that a bad block requires that
>all the Tnodes are recalculated? I hope that this doesnt mean that Tnodes
>already written are invalidated (hardlinks for example).

No Tnodes only exist in RAM. They are the nodes in the tree used to find the
NAND chunk for a particular position in a file. Whenever a NAND chunk is
rewritten (ie replaced), the tnode is updated. There is no recalculation.

I will check out the mkyaffsimage further to ensure it is doing The Good
Stuff.

-- Charles


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by 
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" 
(without the quotes) as the subject.