Lines Matching refs:l2nb

85 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results);
90 int l2nb, s64 * results);
94 int l2nb,
96 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb,
98 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno,
101 static int dbFindBits(u32 word, int l2nb);
102 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno);
103 static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx);
708 int l2nb; in dbAlloc() local
719 l2nb = BLKSTOL2(nblocks); in dbAlloc()
734 if (l2nb > bmp->db_agl2size) { in dbAlloc()
737 rc = dbAllocAny(bmp, nblocks, l2nb, results); in dbAlloc()
818 dbAllocNear(bmp, dp, blkno, (int) nblocks, l2nb, results)) in dbAlloc()
830 if ((rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results)) in dbAlloc()
847 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) != -ENOSPC) in dbAlloc()
863 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) == -ENOSPC) in dbAlloc()
864 rc = dbAllocAny(bmp, nblocks, l2nb, results); in dbAlloc()
1258 struct dmap * dp, s64 blkno, int nblocks, int l2nb, s64 * results) in dbAllocNear() argument
1282 if (leaf[word] < l2nb) in dbAllocNear()
1297 dbFindBits(le32_to_cpu(dp->wmap[word]), l2nb); in dbAllocNear()
1366 dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) in dbAllocAG() argument
1377 if (l2nb > bmp->db_agl2size) { in dbAllocAG()
1407 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAG()
1455 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1464 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1500 if (l2nb < budmin) { in dbAllocAG()
1507 dbFindCtl(bmp, l2nb, bmp->db_aglevel - 1, in dbAllocAG()
1520 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAG()
1564 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results) in dbAllocAny() argument
1575 if ((rc = dbFindCtl(bmp, l2nb, bmp->db_maxlevel, &blkno))) in dbAllocAny()
1580 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAny()
1625 int rc, l2nb; in dbDiscardAG() local
1653 l2nb = BLKSTOL2(nblocks); in dbDiscardAG()
1656 rc = dbAllocAG(bmp, agno, nblocks, l2nb, &blkno); in dbDiscardAG()
1671 l2nb = BLKSTOL2(nblocks) - 1; in dbDiscardAG()
1672 nblocks = 1 << l2nb; in dbDiscardAG()
1727 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) in dbFindCtl() argument
1763 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
1791 if (l2nb >= budmin) in dbFindCtl()
1846 dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) in dbAllocCtl() argument
1855 if (l2nb <= L2BPERDMAP) { in dbAllocCtl()
1866 rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results); in dbAllocCtl()
1998 struct dmap * dp, int nblocks, int l2nb, s64 * results) in dbAllocDmapLev() argument
2004 assert(l2nb <= L2BPERDMAP); in dbAllocDmapLev()
2010 if (dbFindLeaf((dmtree_t *) & dp->tree, l2nb, &leafidx)) in dbAllocDmapLev()
2023 blkno += dbFindBits(le32_to_cpu(dp->wmap[leafidx]), l2nb); in dbAllocDmapLev()
2972 static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx) in dbFindLeaf() argument
2979 if (l2nb > tp->dmt_stree[ROOT]) in dbFindLeaf()
2995 if (l2nb <= tp->dmt_stree[x + n]) in dbFindLeaf()
3030 static int dbFindBits(u32 word, int l2nb) in dbFindBits() argument
3037 nb = 1 << l2nb; in dbFindBits()
3162 int l2nb; in blkstol2() local
3169 for (l2nb = 0; l2nb < 64; l2nb++, mask >>= 1) { in blkstol2()
3175 l2nb = (64 - 1) - l2nb; in blkstol2()
3180 l2nb++; in blkstol2()
3182 return (l2nb); in blkstol2()