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)
35 } __attribute__ ((__packed__
));
38 struct tree_buffer
*node
;
39 struct ctree_root
*extent_root
;
40 struct alloc_extent
*alloc_extent
;
41 struct alloc_extent
*reserve_extent
;
43 struct radix_tree_root cache_radix
;
44 struct alloc_extent ai1
;
45 struct alloc_extent ai2
;
48 struct ctree_root_info
{
49 u64 fsid
[2]; /* FS specific uuid */
50 u64 blocknr
; /* blocknr of this block */
51 u64 objectid
; /* inode number of this root */
52 u64 tree_root
; /* the tree root */
55 struct alloc_extent alloc_extent
;
56 struct alloc_extent reserve_extent
;
57 u64 snapuuid
[2]; /* root specific uuid */
58 } __attribute__ ((__packed__
));
64 } __attribute__ ((__packed__
));
66 #define LEAF_DATA_SIZE (CTREE_BLOCKSIZE - sizeof(struct header))
70 struct item items
[LEAF_DATA_SIZE
/sizeof(struct item
)];
71 u8 data
[CTREE_BLOCKSIZE
-sizeof(struct header
)];
73 } __attribute__ ((__packed__
));
77 struct key keys
[NODEPTRS_PER_BLOCK
];
78 u64 blockptrs
[NODEPTRS_PER_BLOCK
];
79 } __attribute__ ((__packed__
));
84 } __attribute__ ((__packed__
));
87 struct tree_buffer
*nodes
[MAX_LEVEL
];