4 #define CTREE_BLOCKSIZE 256
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 node_level(f) ((f) & (MAX_LEVEL-1))
27 #define is_leaf(f) (node_level(f) == 0)
32 struct tree_buffer
*node
;
33 struct ctree_root
*extent_root
;
34 struct key current_insert
;
36 struct radix_tree_root cache_radix
;
39 struct ctree_root_info
{
40 u64 fsid
[2]; /* FS specific uuid */
41 u64 blocknr
; /* blocknr of this block */
42 u64 objectid
; /* inode number of this root */
43 u64 tree_root
; /* the tree root */
46 u64 snapuuid
[2]; /* root specific uuid */
47 } __attribute__ ((__packed__
));
49 struct ctree_super_block
{
50 struct ctree_root_info root_info
;
51 struct ctree_root_info extent_info
;
52 } __attribute__ ((__packed__
));
58 } __attribute__ ((__packed__
));
60 #define LEAF_DATA_SIZE (CTREE_BLOCKSIZE - sizeof(struct header))
64 struct item items
[LEAF_DATA_SIZE
/sizeof(struct item
)];
65 u8 data
[CTREE_BLOCKSIZE
-sizeof(struct header
)];
67 } __attribute__ ((__packed__
));
71 struct key keys
[NODEPTRS_PER_BLOCK
];
72 u64 blockptrs
[NODEPTRS_PER_BLOCK
];
73 } __attribute__ ((__packed__
));
78 } __attribute__ ((__packed__
));
81 struct tree_buffer
*nodes
[MAX_LEVEL
];