4 #define CTREE_BLOCKSIZE 4096
10 } __attribute__ ((__packed__));
13 u64 fsid[2]; /* FS specific uuid */
20 } __attribute__ ((__packed__));
22 #define NODEPTRS_PER_BLOCK ((CTREE_BLOCKSIZE - sizeof(struct header)) / \
23 (sizeof(struct key) + sizeof(u64)))
26 #define MAX_LEVEL (1 << LEVEL_BITS)
27 #define node_level(f) ((f) & (MAX_LEVEL-1))
28 #define is_leaf(f) (node_level(f) == 0)
32 struct tree_buffer *node;
34 struct radix_tree_root cache_radix;
41 } __attribute__ ((__packed__));
43 #define LEAF_DATA_SIZE (CTREE_BLOCKSIZE - sizeof(struct header))
47 struct item items[LEAF_DATA_SIZE/sizeof(struct item)];
48 u8 data[CTREE_BLOCKSIZE-sizeof(struct header)];
50 } __attribute__ ((__packed__));
54 struct key keys[NODEPTRS_PER_BLOCK];
55 u64 blockptrs[NODEPTRS_PER_BLOCK];
56 } __attribute__ ((__packed__));
59 struct tree_buffer *nodes[MAX_LEVEL];