Go to the documentation of this file.
23 #ifndef _NILFS_BTREE_H
24 #define _NILFS_BTREE_H
26 #include <linux/types.h>
28 #include <linux/list.h>
53 #define NILFS_BTREE_ROOT_SIZE NILFS_BMAP_SIZE
54 #define NILFS_BTREE_ROOT_NCHILDREN_MAX \
55 ((NILFS_BTREE_ROOT_SIZE - sizeof(struct nilfs_btree_node)) / \
56 (sizeof(__le64 ) + sizeof(__le64 )))
57 #define NILFS_BTREE_ROOT_NCHILDREN_MIN 0
58 #define NILFS_BTREE_NODE_EXTRA_PAD_SIZE (sizeof(__le64))
59 #define NILFS_BTREE_NODE_NCHILDREN_MAX(nodesize) \
60 (((nodesize) - sizeof(struct nilfs_btree_node) - \
61 NILFS_BTREE_NODE_EXTRA_PAD_SIZE) / \
62 (sizeof(__le64 ) + sizeof(__le64 )))
63 #define NILFS_BTREE_NODE_NCHILDREN_MIN(nodesize) \
64 ((NILFS_BTREE_NODE_NCHILDREN_MAX(nodesize) - 1) / 2 + 1)
65 #define NILFS_BTREE_KEY_MIN ((__u64)0)
66 #define NILFS_BTREE_KEY_MAX (~(__u64)0)