logo.gif (6996 bytes)
BNode

Up

The BNode structure is used for all non-leaf BNodes.  For those nodes it is used to point to a specific part further down the tree.  Leaf nodes have their own structure, which is based on this structure.  Only the first field of such a leaf node structure needs to be the same as the BNode structure.  The data field can be used in any way desired, and for leaf nodes the structure can be extended with extra information as well.  See the ExtentBNode structure for more information on such an extended BNode structure used for leaf nodes.

Field Type Description
key ULONG A key value.  What this value represents exactly is determined by the nature of the B-Tree.  At the moment only one B-Tree is in use.  This B-Tree is used to store block numbers which contain data belonging to files, and the key value is in this case a block number.
data ULONG The data belonging to this key value.  In the case of a leaf node, this value can represent any data you wish to store in the tree.  For normal nodes the data field holds a block number to a child BNodeContainer.
struct BNode {
    ULONG key;
    ULONG data;
}; 

All rights reserved.
For comments, problems or questions regarding this page contact John Hendrikx.
Last updated: 05 maart 1999.