Data Fields | |
uint8_t | node_type |
uint8_t | node_refs |
uint16_t | node_links |
Number of links. | |
uint32_t | node_size |
time_t | node_mtime |
PNUT_BLKNUM | node_blocks [PNUT_BLOCKS_PER_NODE] |
Node structure.
The Peanut filesystem divides the total space into blocks. It distinguishes between unallocated blocks, data blocks and blocks containing node informations. Each allocated data block is associated to a node block. Unallocated blocks are collected in a linked list.
Peanut knows two types of nodes, file nodes and directory nodes. Each file node represents a file entry and the associated data blocks contain the contents of this file. Each directory node represents a directory and the associated data blocks contain the entries in this directory. Each directory entry in use contains a link to to a node block.
Type of this node, 0=file, 1=dir
Reference counter: Number of active open calls.
Number of links.
For file nodes this number keeps track of the number of directory entries pointing to it. PNUT currently doesn't support link type entries, thus in file entries this is always 1.
For directory nodes the number represents the number of subdirectories plus 2.
Total size of the data area.
Time of last modification.
PNUT_BLKNUM PNUT_NODE::node_blocks[PNUT_BLOCKS_PER_NODE] |
Allocated data blocks.