1
2
3
4
5
6
7 extern char internal_error_message[];
8 #define INTERN_ERR internal_error_message, __FILE__, __LINE__
9 #define WHERE_ERR __FILE__, __LINE__
10
11 #define XIAFS_ZSHIFT(sp) ((sp)->u.xiafs_sb.s_zone_shift)
12 #define XIAFS_ZSIZE(sp) (BLOCK_SIZE << XIAFS_ZSHIFT(sp))
13 #define XIAFS_ZSIZE_BITS(sp) (BLOCK_SIZE_BITS + XIAFS_ZSHIFT(sp))
14 #define XIAFS_ADDRS_PER_Z(sp) (BLOCK_SIZE >> (2 - XIAFS_ZSHIFT(sp)))
15 #define XIAFS_ADDRS_PER_Z_BITS(sp) (BLOCK_SIZE_BITS - 2 + XIAFS_ZSHIFT(sp))
16 #define XIAFS_BITS_PER_Z(sp) (BLOCK_SIZE << (3 + XIAFS_ZSHIFT(sp)))
17 #define XIAFS_BITS_PER_Z_BITS(sp) (BLOCK_SIZE_BITS + 3 + XIAFS_ZSHIFT(sp))
18 #define XIAFS_INODES_PER_Z(sp) (_XIAFS_INODES_PER_BLOCK << XIAFS_ZSHIFT(sp))
19
20
21
22
23 #define XIAFS_GET_BLOCKS(row_ip, blocks) \
24 blocks=((((row_ip)->i_zone[0] >> 24) & 0xff )|\
25 (((row_ip)->i_zone[1] >> 16) & 0xff00 )|\
26 (((row_ip)->i_zone[2] >> 8) & 0xff0000 ) )
27
28
29 #define XIAFS_PUT_BLOCKS(row_ip, blocks) \
30 (row_ip)->i_zone[2]=((blocks)<< 8) & 0xff000000;\
31 (row_ip)->i_zone[1]=((blocks)<<16) & 0xff000000;\
32 (row_ip)->i_zone[0]=((blocks)<<24) & 0xff000000