Go to the documentation of this file.
24 #define TREESIZE (256+64+16+4+1)
25 #define LEAFIND (64+16+4+1)
30 #define BUDMIN L2DBWORD
31 #define BPERDMAP (LPERDMAP * DBWORD)
33 #define CTLTREESIZE (1024+256+64+16+4+1)
34 #define CTLLEAFIND (256+64+16+4+1)
38 #define NOFREE ((s8) -1)
47 #define L2MAXL0SIZE (L2BPERDMAP + 1 * L2LPERCTL)
48 #define L2MAXL1SIZE (L2BPERDMAP + 2 * L2LPERCTL)
49 #define L2MAXL2SIZE (L2BPERDMAP + 3 * L2LPERCTL)
54 #define MAXL0SIZE ((s64)1 << L2MAXL0SIZE)
55 #define MAXL1SIZE ((s64)1 << L2MAXL1SIZE)
56 #define MAXL2SIZE ((s64)1 << L2MAXL2SIZE)
58 #define MAXMAPSIZE MAXL2SIZE
64 static inline signed char TREEMAX(
signed char *
cp)
66 signed char tmp1, tmp2;
68 tmp1 =
max(*(cp+2), *(cp+3));
69 tmp2 =
max(*(cp), *(cp+1));
71 return max(tmp1, tmp2);
85 #define BLKTODMAP(b,s) \
86 ((((b) >> 13) + ((b) >> 23) + ((b) >> 33) + 3 + 1) << (s))
100 #define BLKTOL0(b,s) \
101 (((((b) >> 23) << 10) + ((b) >> 23) + ((b) >> 33) + 2 + 1) << (s))
115 #define BLKTOL1(b,s) \
116 (((((b) >> 33) << 20) + (((b) >> 33) << 10) + ((b) >> 33) + 1 + 1) << (s))
122 #define BLKTOCTL(b,s,l) \
123 (((l) == 2) ? 1 : ((l) == 1) ? BLKTOL1((b),(s)) : BLKTOL0((b),(s)))
129 #define BMAPSZTOLEV(size) \
130 (((size) <= MAXL0SIZE) ? 0 : ((size) <= MAXL1SIZE) ? 1 : 2)
134 #define BLKTOAG(b,sbi) ((b) >> ((sbi)->bmap->db_agl2size))
139 #define AGTOBLK(a,ip) \
140 ((s64)(a) << (JFS_SBI((ip)->i_sb)->bmap->db_agl2size))
194 #define dmt_nleafs t1.nleafs
195 #define dmt_l2nleafs t1.l2nleafs
196 #define dmt_leafidx t1.leafidx
197 #define dmt_height t1.height
198 #define dmt_budmin t1.budmin
199 #define dmt_stree t1.stree
252 #define db_mapsize db_bmap.dn_mapsize
253 #define db_nfree db_bmap.dn_nfree
254 #define db_agfree db_bmap.dn_agfree
255 #define db_agsize db_bmap.dn_agsize
256 #define db_agl2size db_bmap.dn_agl2size
257 #define db_agwidth db_bmap.dn_agwidth
258 #define db_agheight db_bmap.dn_agheight
259 #define db_agstart db_bmap.dn_agstart
260 #define db_numag db_bmap.dn_numag
261 #define db_maxlevel db_bmap.dn_maxlevel
262 #define db_aglevel db_bmap.dn_aglevel
263 #define db_agpref db_bmap.dn_agpref
264 #define db_maxag db_bmap.dn_maxag
265 #define db_maxfreebud db_bmap.dn_maxfreebud
266 #define db_l2nbperpage db_bmap.dn_l2nbperpage
275 #define BLKSTOL2(d) (blkstol2(d))
278 #define NLSTOL2BSZ(n) (31 - cntlz((n)) + BUDMIN)
281 #define LITOL2BSZ(n,m,b) ((((n) == 0) ? (m) : cnttz((n))) + (b))
284 #define BLKTOCTLLEAF(b,m) \
285 (((b) & (((s64)1 << ((m) + L2LPERCTL)) - 1)) >> (m))
288 #define BUDSIZE(s,m) (1 << ((s) - (m)))