Go to the documentation of this file.
18 #ifndef __XFS_IALLOC_BTREE_H__
19 #define __XFS_IALLOC_BTREE_H__
32 #define XFS_IBT_MAGIC 0x49414254
35 #define XFS_INODES_PER_CHUNK (NBBY * sizeof(xfs_inofree_t))
36 #define XFS_INODES_PER_CHUNK_LOG (XFS_NBBYLOG + 3)
37 #define XFS_INOBT_ALL_FREE ((xfs_inofree_t)-1)
38 #define XFS_INOBT_MASK(i) ((xfs_inofree_t)1 << (i))
74 #define XFS_IBT_BLOCK(mp) ((xfs_agblock_t)(XFS_CNT_BLOCK(mp) + 1))
75 #define XFS_PREALLOC_BLOCKS(mp) ((xfs_agblock_t)(XFS_IBT_BLOCK(mp) + 1))
82 #define XFS_INOBT_BLOCK_LEN(mp) XFS_BTREE_SBLOCK_LEN
89 #define XFS_INOBT_REC_ADDR(mp, block, index) \
90 ((xfs_inobt_rec_t *) \
92 XFS_INOBT_BLOCK_LEN(mp) + \
93 (((index) - 1) * sizeof(xfs_inobt_rec_t))))
95 #define XFS_INOBT_KEY_ADDR(mp, block, index) \
96 ((xfs_inobt_key_t *) \
98 XFS_INOBT_BLOCK_LEN(mp) + \
99 ((index) - 1) * sizeof(xfs_inobt_key_t)))
101 #define XFS_INOBT_PTR_ADDR(mp, block, index, maxrecs) \
102 ((xfs_inobt_ptr_t *) \
104 XFS_INOBT_BLOCK_LEN(mp) + \
105 (maxrecs) * sizeof(xfs_inobt_key_t) + \
106 ((index) - 1) * sizeof(xfs_inobt_ptr_t)))