Lines Matching +full:max +full:- +full:bits +full:- +full:per +full:- +full:word

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) International Business Machines Corp., 2000-2002
13 #define LPERDMAP 256 /* num leaves per dmap tree */
14 #define L2LPERDMAP 8 /* l2 number of leaves per dmap tree */
15 #define DBWORD 32 /* # of blks covered by a map word */
17 #define BUDMIN L2DBWORD /* max free string in a map word */
18 #define BPERDMAP (LPERDMAP * DBWORD) /* num of blks per dmap */
19 #define L2BPERDMAP 13 /* l2 num of blks per dmap */
22 #define LPERCTL 1024 /* num of leaves per dmapctl tree */
23 #define L2LPERCTL 10 /* l2 num of leaves per dmapctl tree */
25 #define NOFREE ((s8) -1) /* no blocks free */
26 #define MAXAG 128 /* max number of allocation groups */
27 #define L2MAXAG 7 /* l2 max num of AG */
55 tmp1 = max(*(cp+2), *(cp+3)); in TREEMAX()
56 tmp2 = max(*(cp), *(cp+1)); in TREEMAX()
58 return max(tmp1, tmp2); in TREEMAX()
63 * describing the disk block. s is the log2(number of logical blocks per page)
66 * - the number of dmaps preceding it
67 * - the number of L0 pages preceding its L0 page
68 * - the number of L1 pages preceding its L1 page
69 * - 3 is added to account for the L2, L1, and L0 page for this dmap
70 * - 1 is added to account for the control page of the map.
78 * per page)
81 * - the number of dmap pages preceding it
82 * - the number of L0 pages preceding it
83 * - the number of L1 pages preceding its L1 page
84 * - 2 is added to account for the L2, and L1 page for this L0
85 * - 1 is added to account for the control page of the map.
93 * per page)
96 * - the number of dmap pages preceding it
97 * - the number of L0 pages preceding it
98 * - the number of L1 pages preceding it
99 * - 1 is added to account for the L2 page
100 * - 1 is added to account for the control page of the map.
121 #define BLKTOAG(b,sbi) ((b) >> ((sbi)->bmap->db_agl2size))
127 ((s64)(a) << (JFS_SBI((ip)->i_sb)->bmap->db_agl2size))
141 u8 pad[2]; /* 2: pad to word boundary */
142 }; /* - 360 - */
145 * dmap page per 8K blocks bitmap
153 __le32 wmap[LPERDMAP]; /* 1024: bits of the working map */
154 __le32 pmap[LPERDMAP]; /* 1024: bits of the persistent map */
155 }; /* - 4096 - */
158 * disk map control page per level.
170 }; /* - 4096 - */
189 * on-disk aggregate disk allocation map descriptor.
194 __le32 dn_l2nbperpage; /* 4: number of blks per page */
197 __le32 dn_maxag; /* 4: max active alloc group number */
203 __le32 dn_agl2size; /* 4: l2 num of blks per alloc group */
204 __le64 dn_agfree[MAXAG];/* 8*MAXAG: per AG free count */
205 __le64 dn_agsize; /* 8: num of blks per alloc group */
206 s8 dn_maxfreebud; /* 1: max free buddy system */
208 }; /* - 4096 - */
213 int dn_l2nbperpage; /* number of blks per page */
216 int dn_maxag; /* max active alloc group number */
222 int dn_agl2size; /* l2 num of blks per alloc group */
223 s64 dn_agfree[MAXAG]; /* per AG free count */
224 s64 dn_agsize; /* num of blks per alloc group */
225 signed char dn_maxfreebud; /* max free buddy system */
226 }; /* - 4096 - */
228 * in-memory aggregate disk allocation map descriptor.
231 struct dbmap db_bmap; /* on-disk aggregate map descriptor */
238 /* macros for accessing fields within in-memory aggregate map descriptor */
265 #define NLSTOL2BSZ(n) (31 - cntlz((n)) + BUDMIN)
272 (((b) & (((s64)1 << ((m) + L2LPERCTL)) - 1)) >> (m))
275 #define BUDSIZE(s,m) (1 << ((s) - (m)))