Skip to contentSkip to conversation

how to linking and traversing the inmemory tree

DISCUSSION siddharth kothari 2 participants 2 messages Mar 13, 2005 – Mar 14, 2005

lore
Share & tools
lore
#0 lore raw

hi.
i am trying to create an in-memory for Reiser4. from the code i understand the following:
1) Znode is the inmemory representation of the actual node.
2) children have pointers to thier parents and alsso maintain their position in parents.
3) Znodes also have the de-limiting keys
and other fields.

now my questions are:

1) from where do you start traversing the tree?
2) are these nodes actually linked in memory as they are in a tree.
3) once you get a key for a file how do u locate the lock where the data for that file is to be found.

you obviously compare with the de-limiting keys to get to the node then wat.... how do u reach any other level since there are no down pointers.

regards,
siddharth

When I was small I thought everything was either Black or White,
Good or Bad,
But I grew up to find out everthing was just Grey....

__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

#1 lore raw

siddharth kothari wrote:

Hello

Quoted 9 lines

hi. i am trying to create an in-memory for Reiser4. from the code i understand the following:
1) Znode is the inmemory representation of the actual node.
2) children have pointers to thier parents and alsso maintain their position in parents.
3) Znodes also have the de-limiting keys
and other fields.

Quoted 5 lines

now my questions are:

1) from where do you start traversing the tree?

From root znode if the node of current position is unknown or got changed (there is so-called 'seal technique' to understand this), otherwise traversing is resolved just to per-node lookup.

Quoted 4 lines

2) are these nodes actually linked in memory as they are in a tree.

Yes, all the relations are the same

Quoted 4 lines

3) once you get a key for a file how do u locate the lock where the data for that file is to be found.

This is a business of main search procedure (see coord_by_key())

Quoted 20 lines

you obviously compare with the de-limiting keys to get to the node then wat.... how do u reach any other level since there are no down pointers.

regards,
siddharth

When I was small I thought everything was either Black or White,
Good or Bad,
But I grew up to find out everthing was just Grey....

__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/