diff options
Diffstat (limited to 'fs/xfs/xfs_btree.h')
-rw-r--r-- | fs/xfs/xfs_btree.h | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index e6b2a09401c6..44f1bd98064a 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h | |||
@@ -39,25 +39,23 @@ struct xfs_trans; | |||
39 | /* | 39 | /* |
40 | * Short form header: space allocation btrees. | 40 | * Short form header: space allocation btrees. |
41 | */ | 41 | */ |
42 | typedef struct xfs_btree_sblock | 42 | typedef struct xfs_btree_sblock { |
43 | { | 43 | __be32 bb_magic; /* magic number for block type */ |
44 | __uint32_t bb_magic; /* magic number for block type */ | 44 | __be16 bb_level; /* 0 is a leaf */ |
45 | __uint16_t bb_level; /* 0 is a leaf */ | 45 | __be16 bb_numrecs; /* current # of data records */ |
46 | __uint16_t bb_numrecs; /* current # of data records */ | 46 | __be32 bb_leftsib; /* left sibling block or NULLAGBLOCK */ |
47 | xfs_agblock_t bb_leftsib; /* left sibling block or NULLAGBLOCK */ | 47 | __be32 bb_rightsib; /* right sibling block or NULLAGBLOCK */ |
48 | xfs_agblock_t bb_rightsib; /* right sibling block or NULLAGBLOCK */ | ||
49 | } xfs_btree_sblock_t; | 48 | } xfs_btree_sblock_t; |
50 | 49 | ||
51 | /* | 50 | /* |
52 | * Long form header: bmap btrees. | 51 | * Long form header: bmap btrees. |
53 | */ | 52 | */ |
54 | typedef struct xfs_btree_lblock | 53 | typedef struct xfs_btree_lblock { |
55 | { | 54 | __be32 bb_magic; /* magic number for block type */ |
56 | __uint32_t bb_magic; /* magic number for block type */ | 55 | __be16 bb_level; /* 0 is a leaf */ |
57 | __uint16_t bb_level; /* 0 is a leaf */ | 56 | __be16 bb_numrecs; /* current # of data records */ |
58 | __uint16_t bb_numrecs; /* current # of data records */ | 57 | __be64 bb_leftsib; /* left sibling block or NULLDFSBNO */ |
59 | xfs_dfsbno_t bb_leftsib; /* left sibling block or NULLDFSBNO */ | 58 | __be64 bb_rightsib; /* right sibling block or NULLDFSBNO */ |
60 | xfs_dfsbno_t bb_rightsib; /* right sibling block or NULLDFSBNO */ | ||
61 | } xfs_btree_lblock_t; | 59 | } xfs_btree_lblock_t; |
62 | 60 | ||
63 | /* | 61 | /* |
@@ -65,24 +63,23 @@ typedef struct xfs_btree_lblock | |||
65 | */ | 63 | */ |
66 | typedef struct xfs_btree_hdr | 64 | typedef struct xfs_btree_hdr |
67 | { | 65 | { |
68 | __uint32_t bb_magic; /* magic number for block type */ | 66 | __be32 bb_magic; /* magic number for block type */ |
69 | __uint16_t bb_level; /* 0 is a leaf */ | 67 | __be16 bb_level; /* 0 is a leaf */ |
70 | __uint16_t bb_numrecs; /* current # of data records */ | 68 | __be16 bb_numrecs; /* current # of data records */ |
71 | } xfs_btree_hdr_t; | 69 | } xfs_btree_hdr_t; |
72 | 70 | ||
73 | typedef struct xfs_btree_block | 71 | typedef struct xfs_btree_block { |
74 | { | ||
75 | xfs_btree_hdr_t bb_h; /* header */ | 72 | xfs_btree_hdr_t bb_h; /* header */ |
76 | union { | 73 | union { |
77 | struct { | 74 | struct { |
78 | xfs_agblock_t bb_leftsib; | 75 | __be32 bb_leftsib; |
79 | xfs_agblock_t bb_rightsib; | 76 | __be32 bb_rightsib; |
80 | } s; /* short form pointers */ | 77 | } s; /* short form pointers */ |
81 | struct { | 78 | struct { |
82 | xfs_dfsbno_t bb_leftsib; | 79 | __be64 bb_leftsib; |
83 | xfs_dfsbno_t bb_rightsib; | 80 | __be64 bb_rightsib; |
84 | } l; /* long form pointers */ | 81 | } l; /* long form pointers */ |
85 | } bb_u; /* rest */ | 82 | } bb_u; /* rest */ |
86 | } xfs_btree_block_t; | 83 | } xfs_btree_block_t; |
87 | 84 | ||
88 | /* | 85 | /* |
@@ -146,7 +143,7 @@ typedef struct xfs_btree_cur | |||
146 | struct xfs_trans *bc_tp; /* transaction we're in, if any */ | 143 | struct xfs_trans *bc_tp; /* transaction we're in, if any */ |
147 | struct xfs_mount *bc_mp; /* file system mount struct */ | 144 | struct xfs_mount *bc_mp; /* file system mount struct */ |
148 | union { | 145 | union { |
149 | xfs_alloc_rec_t a; | 146 | xfs_alloc_rec_incore_t a; |
150 | xfs_bmbt_irec_t b; | 147 | xfs_bmbt_irec_t b; |
151 | xfs_inobt_rec_t i; | 148 | xfs_inobt_rec_t i; |
152 | } bc_rec; /* current insert/search record value */ | 149 | } bc_rec; /* current insert/search record value */ |