Lines Matching refs:bmp
57 #define BMAP_LOCK_INIT(bmp) mutex_init(&bmp->db_bmaplock) argument
58 #define BMAP_LOCK(bmp) mutex_lock(&bmp->db_bmaplock) argument
59 #define BMAP_UNLOCK(bmp) mutex_unlock(&bmp->db_bmaplock) argument
64 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
70 static int dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc,
72 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results);
73 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno,
75 static int dbAllocNear(struct bmap * bmp, struct dmap * dp, s64 blkno,
78 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno,
80 static int dbAllocDmapLev(struct bmap * bmp, struct dmap * dp, int nblocks,
83 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb,
85 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno,
89 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno);
91 static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
93 static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno,
101 static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno,
155 struct bmap *bmp; in dbMount() local
164 bmp = kmalloc(sizeof(struct bmap), GFP_KERNEL); in dbMount()
165 if (bmp == NULL) in dbMount()
179 bmp->db_mapsize = le64_to_cpu(dbmp_le->dn_mapsize); in dbMount()
180 bmp->db_nfree = le64_to_cpu(dbmp_le->dn_nfree); in dbMount()
182 bmp->db_l2nbperpage = le32_to_cpu(dbmp_le->dn_l2nbperpage); in dbMount()
183 if (bmp->db_l2nbperpage > L2PSIZE - L2MINBLOCKSIZE) { in dbMount()
188 bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag); in dbMount()
189 if (!bmp->db_numag) { in dbMount()
194 bmp->db_maxlevel = le32_to_cpu(dbmp_le->dn_maxlevel); in dbMount()
195 bmp->db_maxag = le32_to_cpu(dbmp_le->dn_maxag); in dbMount()
196 bmp->db_agpref = le32_to_cpu(dbmp_le->dn_agpref); in dbMount()
197 bmp->db_aglevel = le32_to_cpu(dbmp_le->dn_aglevel); in dbMount()
198 bmp->db_agheight = le32_to_cpu(dbmp_le->dn_agheight); in dbMount()
199 bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth); in dbMount()
200 bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart); in dbMount()
201 bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size); in dbMount()
202 if (bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG || in dbMount()
203 bmp->db_agl2size < 0) { in dbMount()
208 if (((bmp->db_mapsize - 1) >> bmp->db_agl2size) > MAXAG) { in dbMount()
214 bmp->db_agfree[i] = le64_to_cpu(dbmp_le->dn_agfree[i]); in dbMount()
215 bmp->db_agsize = le64_to_cpu(dbmp_le->dn_agsize); in dbMount()
216 bmp->db_maxfreebud = dbmp_le->dn_maxfreebud; in dbMount()
222 bmp->db_ipbmap = ipbmap; in dbMount()
223 JFS_SBI(ipbmap->i_sb)->bmap = bmp; in dbMount()
225 memset(bmp->db_active, 0, sizeof(bmp->db_active)); in dbMount()
230 BMAP_LOCK_INIT(bmp); in dbMount()
237 kfree(bmp); in dbMount()
260 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbUnmount() local
271 kfree(bmp); in dbUnmount()
283 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbSync() local
300 dbmp_le->dn_mapsize = cpu_to_le64(bmp->db_mapsize); in dbSync()
301 dbmp_le->dn_nfree = cpu_to_le64(bmp->db_nfree); in dbSync()
302 dbmp_le->dn_l2nbperpage = cpu_to_le32(bmp->db_l2nbperpage); in dbSync()
303 dbmp_le->dn_numag = cpu_to_le32(bmp->db_numag); in dbSync()
304 dbmp_le->dn_maxlevel = cpu_to_le32(bmp->db_maxlevel); in dbSync()
305 dbmp_le->dn_maxag = cpu_to_le32(bmp->db_maxag); in dbSync()
306 dbmp_le->dn_agpref = cpu_to_le32(bmp->db_agpref); in dbSync()
307 dbmp_le->dn_aglevel = cpu_to_le32(bmp->db_aglevel); in dbSync()
308 dbmp_le->dn_agheight = cpu_to_le32(bmp->db_agheight); in dbSync()
309 dbmp_le->dn_agwidth = cpu_to_le32(bmp->db_agwidth); in dbSync()
310 dbmp_le->dn_agstart = cpu_to_le32(bmp->db_agstart); in dbSync()
311 dbmp_le->dn_agl2size = cpu_to_le32(bmp->db_agl2size); in dbSync()
313 dbmp_le->dn_agfree[i] = cpu_to_le64(bmp->db_agfree[i]); in dbSync()
314 dbmp_le->dn_agsize = cpu_to_le64(bmp->db_agsize); in dbSync()
315 dbmp_le->dn_maxfreebud = bmp->db_maxfreebud; in dbSync()
355 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; in dbFree() local
361 if (unlikely((blkno == 0) || (blkno + nblocks > bmp->db_mapsize))) { in dbFree()
388 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); in dbFree()
402 if ((rc = dbFreeDmap(bmp, dp, blkno, nb))) { in dbFree()
447 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbUpdatePMap() local
457 if (blkno + nblocks > bmp->db_mapsize) { in dbUpdatePMap()
477 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); in dbUpdatePMap()
483 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, in dbUpdatePMap()
628 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbNextAG() local
630 BMAP_LOCK(bmp); in dbNextAG()
633 avgfree = (u32)bmp->db_nfree / bmp->db_numag; in dbNextAG()
639 agpref = bmp->db_agpref; in dbNextAG()
640 if ((atomic_read(&bmp->db_active[agpref]) == 0) && in dbNextAG()
641 (bmp->db_agfree[agpref] >= avgfree)) in dbNextAG()
647 for (i = 0 ; i < bmp->db_numag; i++, agpref++) { in dbNextAG()
648 if (agpref == bmp->db_numag) in dbNextAG()
651 if (atomic_read(&bmp->db_active[agpref])) in dbNextAG()
654 if (bmp->db_agfree[agpref] >= avgfree) { in dbNextAG()
656 bmp->db_agpref = agpref; in dbNextAG()
658 } else if (bmp->db_agfree[agpref] > hwm) { in dbNextAG()
660 hwm = bmp->db_agfree[agpref]; in dbNextAG()
670 bmp->db_agpref = next_best; in dbNextAG()
673 BMAP_UNLOCK(bmp); in dbNextAG()
677 return (bmp->db_agpref); in dbNextAG()
722 struct bmap *bmp; in dbAlloc() local
739 bmp = JFS_SBI(ip->i_sb)->bmap; in dbAlloc()
741 mapSize = bmp->db_mapsize; in dbAlloc()
752 if (l2nb > bmp->db_agl2size) { in dbAlloc()
755 rc = dbAllocAny(bmp, nblocks, l2nb, results); in dbAlloc()
772 if (blkno >= bmp->db_mapsize) in dbAlloc()
775 agno = blkno >> bmp->db_agl2size; in dbAlloc()
781 if ((blkno & (bmp->db_agsize - 1)) == 0) in dbAlloc()
786 if (atomic_read(&bmp->db_active[agno])) in dbAlloc()
799 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); in dbAlloc()
809 if ((rc = dbAllocNext(bmp, dp, blkno, (int) nblocks)) in dbAlloc()
820 writers = atomic_read(&bmp->db_active[agno]); in dbAlloc()
836 dbAllocNear(bmp, dp, blkno, (int) nblocks, l2nb, results)) in dbAlloc()
848 if ((rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results)) in dbAlloc()
865 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) != -ENOSPC) in dbAlloc()
881 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) == -ENOSPC) in dbAlloc()
882 rc = dbAllocAny(bmp, nblocks, l2nb, results); in dbAlloc()
985 struct bmap *bmp; in dbExtend() local
1005 bmp = sbi->bmap; in dbExtend()
1006 if (lastblkno < 0 || lastblkno >= bmp->db_mapsize) { in dbExtend()
1020 if (addnblocks > BPERDMAP || extblkno >= bmp->db_mapsize || in dbExtend()
1021 (extblkno & (bmp->db_agsize - 1)) == 0) { in dbExtend()
1029 lblkno = BLKTODMAP(extblkno, bmp->db_l2nbperpage); in dbExtend()
1041 rc = dbAllocNext(bmp, dp, extblkno, (int) addnblocks); in dbExtend()
1075 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno, in dbAllocNext() argument
1084 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmap page\n"); in dbAllocNext()
1175 return (dbAllocDmap(bmp, dp, blkno, nblocks)); in dbAllocNext()
1207 dbAllocNear(struct bmap * bmp, in dbAllocNear() argument
1214 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmap page\n"); in dbAllocNear()
1251 if ((rc = dbAllocDmap(bmp, dp, blkno, nblocks)) == 0) in dbAllocNear()
1316 dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) in dbAllocAG() argument
1327 if (l2nb > bmp->db_agl2size) { in dbAllocAG()
1328 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocAG()
1336 blkno = (s64) agno << bmp->db_agl2size; in dbAllocAG()
1355 if (bmp->db_agsize == BPERDMAP in dbAllocAG()
1356 || bmp->db_agfree[agno] == bmp->db_agsize) { in dbAllocAG()
1357 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAG()
1359 (bmp->db_agfree[agno] == bmp->db_agsize)) { in dbAllocAG()
1363 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocAG()
1372 lblkno = BLKTOCTL(blkno, bmp->db_l2nbperpage, bmp->db_aglevel); in dbAllocAG()
1373 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); in dbAllocAG()
1380 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmapctl page\n"); in dbAllocAG()
1393 (1 << (L2LPERCTL - (bmp->db_agheight << 1))) / bmp->db_agwidth; in dbAllocAG()
1394 ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1)); in dbAllocAG()
1402 for (i = 0; i < bmp->db_agwidth; i++, ti++) { in dbAllocAG()
1412 for (k = bmp->db_agheight; k > 0; k--) { in dbAllocAG()
1420 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocAG()
1430 if (bmp->db_aglevel == 2) in dbAllocAG()
1432 else if (bmp->db_aglevel == 1) in dbAllocAG()
1457 dbFindCtl(bmp, l2nb, bmp->db_aglevel - 1, in dbAllocAG()
1460 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocAG()
1470 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAG()
1472 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocAG()
1514 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results) in dbAllocAny() argument
1525 if ((rc = dbFindCtl(bmp, l2nb, bmp->db_maxlevel, &blkno))) in dbAllocAny()
1530 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAny()
1532 jfs_error(bmp->db_ipbmap->i_sb, "unable to allocate blocks\n"); in dbAllocAny()
1572 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; in dbDiscardAG() local
1590 nblocks = bmp->db_agfree[agno]; in dbDiscardAG()
1596 jfs_error(bmp->db_ipbmap->i_sb, "no memory for trim array\n"); in dbDiscardAG()
1606 rc = dbAllocAG(bmp, agno, nblocks, l2nb, &blkno); in dbDiscardAG()
1613 if (bmp->db_agfree[agno] == 0) in dbDiscardAG()
1617 nblocks = bmp->db_agfree[agno]; in dbDiscardAG()
1625 jfs_error(bmp->db_ipbmap->i_sb, "-EIO\n"); in dbDiscardAG()
1677 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) in dbFindCtl() argument
1694 lblkno = BLKTOCTL(b, bmp->db_l2nbperpage, lev); in dbFindCtl()
1695 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); in dbFindCtl()
1702 jfs_error(bmp->db_ipbmap->i_sb, in dbFindCtl()
1723 jfs_error(bmp->db_ipbmap->i_sb, in dbFindCtl()
1796 dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) in dbAllocCtl() argument
1808 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); in dbAllocCtl()
1809 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); in dbAllocCtl()
1816 rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results); in dbAllocCtl()
1835 lblkno = BLKTODMAP(b, bmp->db_l2nbperpage); in dbAllocCtl()
1836 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); in dbAllocCtl()
1847 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocCtl()
1859 if ((rc = dbAllocDmap(bmp, dp, b, nb))) { in dbAllocCtl()
1888 lblkno = BLKTODMAP(b, bmp->db_l2nbperpage); in dbAllocCtl()
1889 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); in dbAllocCtl()
1894 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocCtl()
1902 if (dbFreeDmap(bmp, dp, b, BPERDMAP)) { in dbAllocCtl()
1907 jfs_error(bmp->db_ipbmap->i_sb, "Block Leakage\n"); in dbAllocCtl()
1947 dbAllocDmapLev(struct bmap * bmp, in dbAllocDmapLev() argument
1979 if ((rc = dbAllocDmap(bmp, dp, blkno, nblocks)) == 0) in dbAllocDmapLev()
2013 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, in dbAllocDmap() argument
2025 dbAllocBits(bmp, dp, blkno, nblocks); in dbAllocDmap()
2035 if ((rc = dbAdjCtl(bmp, blkno, dp->tree.stree[ROOT], 1, 0))) in dbAllocDmap()
2036 dbFreeBits(bmp, dp, blkno, nblocks); in dbAllocDmap()
2068 static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, in dbFreeDmap() argument
2080 rc = dbFreeBits(bmp, dp, blkno, nblocks); in dbFreeDmap()
2090 if ((rc = dbAdjCtl(bmp, blkno, dp->tree.stree[ROOT], 0, 0))) { in dbFreeDmap()
2101 dbAllocBits(bmp, dp, blkno, nblocks); in dbFreeDmap()
2130 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno, in dbAllocBits() argument
2206 jfs_error(bmp->db_ipbmap->i_sb, in dbAllocBits()
2237 BMAP_LOCK(bmp); in dbAllocBits()
2243 agno = blkno >> bmp->db_agl2size; in dbAllocBits()
2244 if (agno > bmp->db_maxag) in dbAllocBits()
2245 bmp->db_maxag = agno; in dbAllocBits()
2248 bmp->db_agfree[agno] -= nblocks; in dbAllocBits()
2249 bmp->db_nfree -= nblocks; in dbAllocBits()
2251 BMAP_UNLOCK(bmp); in dbAllocBits()
2277 static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, in dbFreeBits() argument
2381 BMAP_LOCK(bmp); in dbFreeBits()
2386 agno = blkno >> bmp->db_agl2size; in dbFreeBits()
2387 bmp->db_nfree += nblocks; in dbFreeBits()
2388 bmp->db_agfree[agno] += nblocks; in dbFreeBits()
2395 if ((bmp->db_agfree[agno] == bmp->db_agsize && agno == bmp->db_maxag) || in dbFreeBits()
2396 (agno == bmp->db_numag - 1 && in dbFreeBits()
2397 bmp->db_agfree[agno] == (bmp-> db_mapsize & (BPERDMAP - 1)))) { in dbFreeBits()
2398 while (bmp->db_maxag > 0) { in dbFreeBits()
2399 bmp->db_maxag -= 1; in dbFreeBits()
2400 if (bmp->db_agfree[bmp->db_maxag] != in dbFreeBits()
2401 bmp->db_agsize) in dbFreeBits()
2409 if (bmp->db_agpref > bmp->db_maxag) in dbFreeBits()
2410 bmp->db_agpref = bmp->db_maxag; in dbFreeBits()
2413 BMAP_UNLOCK(bmp); in dbFreeBits()
2461 dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc, int level) in dbAdjCtl() argument
2473 lblkno = BLKTOCTL(blkno, bmp->db_l2nbperpage, level); in dbAdjCtl()
2474 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); in dbAdjCtl()
2480 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmapctl page\n"); in dbAdjCtl()
2544 if (level < bmp->db_maxlevel) { in dbAdjCtl()
2549 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2582 assert(level == bmp->db_maxlevel); in dbAdjCtl()
2583 if (bmp->db_maxfreebud != oldroot) { in dbAdjCtl()
2584 jfs_error(bmp->db_ipbmap->i_sb, in dbAdjCtl()
2587 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3172 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; in dbAllocBottomUp() local
3177 ASSERT(nblocks <= bmp->db_mapsize - blkno); in dbAllocBottomUp()
3190 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); in dbAllocBottomUp()
3204 if ((rc = dbAllocDmapBU(bmp, dp, blkno, nb))) { in dbAllocBottomUp()
3220 static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, in dbAllocDmapBU() argument
3293 BMAP_LOCK(bmp); in dbAllocDmapBU()
3299 agno = blkno >> bmp->db_agl2size; in dbAllocDmapBU()
3300 if (agno > bmp->db_maxag) in dbAllocDmapBU()
3301 bmp->db_maxag = agno; in dbAllocDmapBU()
3304 bmp->db_agfree[agno] -= nblocks; in dbAllocDmapBU()
3305 bmp->db_nfree -= nblocks; in dbAllocDmapBU()
3307 BMAP_UNLOCK(bmp); in dbAllocDmapBU()
3317 if ((rc = dbAdjCtl(bmp, blkno, tp->stree[ROOT], 1, 0))) in dbAllocDmapBU()
3318 dbFreeBits(bmp, dp, blkno, nblocks); in dbAllocDmapBU()
3352 struct bmap *bmp = sbi->bmap; in dbExtendFS() local
3369 bmp->db_mapsize = newsize; in dbExtendFS()
3370 bmp->db_maxlevel = BMAPSZTOLEV(bmp->db_mapsize); in dbExtendFS()
3374 oldl2agsize = bmp->db_agl2size; in dbExtendFS()
3376 bmp->db_agl2size = l2agsize; in dbExtendFS()
3377 bmp->db_agsize = 1 << l2agsize; in dbExtendFS()
3380 agno = bmp->db_numag; in dbExtendFS()
3381 bmp->db_numag = newsize >> l2agsize; in dbExtendFS()
3382 bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; in dbExtendFS()
3395 ag_rem = bmp->db_agfree[0]; /* save agfree[0] */ in dbExtendFS()
3397 bmp->db_agfree[n] = 0; /* init collection point */ in dbExtendFS()
3402 bmp->db_agfree[n] += bmp->db_agfree[i]; in dbExtendFS()
3405 bmp->db_agfree[0] += ag_rem; /* restore agfree[0] */ in dbExtendFS()
3408 bmp->db_agfree[n] = 0; in dbExtendFS()
3414 bmp->db_maxag = bmp->db_maxag / k; in dbExtendFS()
3530 bmp->db_nfree += n; in dbExtendFS()
3532 bmp->db_agfree[agno] += n; in dbExtendFS()
3561 bmp->db_maxfreebud = *l1leaf; in dbExtendFS()
3585 bmp->db_maxfreebud = *l2leaf; in dbExtendFS()
3615 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; in dbFinalizeBmap() local
3630 actags = bmp->db_maxag + 1; in dbFinalizeBmap()
3631 inactags = bmp->db_numag - actags; in dbFinalizeBmap()
3632 ag_rem = bmp->db_mapsize & (bmp->db_agsize - 1); /* ??? */ in dbFinalizeBmap()
3640 ((inactags - 1) << bmp->db_agl2size) + ag_rem in dbFinalizeBmap()
3641 : inactags << bmp->db_agl2size; in dbFinalizeBmap()
3647 actfree = bmp->db_nfree - inactfree; in dbFinalizeBmap()
3654 if (bmp->db_agfree[bmp->db_agpref] < avgfree) { in dbFinalizeBmap()
3655 for (bmp->db_agpref = 0; bmp->db_agpref < actags; in dbFinalizeBmap()
3656 bmp->db_agpref++) { in dbFinalizeBmap()
3657 if (bmp->db_agfree[bmp->db_agpref] >= avgfree) in dbFinalizeBmap()
3660 if (bmp->db_agpref >= bmp->db_numag) { in dbFinalizeBmap()
3673 bmp->db_aglevel = BMAPSZTOLEV(bmp->db_agsize); in dbFinalizeBmap()
3675 bmp->db_agl2size - (L2BPERDMAP + bmp->db_aglevel * L2LPERCTL); in dbFinalizeBmap()
3676 bmp->db_agheight = l2nl >> 1; in dbFinalizeBmap()
3677 bmp->db_agwidth = 1 << (l2nl - (bmp->db_agheight << 1)); in dbFinalizeBmap()
3678 for (i = 5 - bmp->db_agheight, bmp->db_agstart = 0, n = 1; i > 0; in dbFinalizeBmap()
3680 bmp->db_agstart += n; in dbFinalizeBmap()