Lines Matching refs:l2nb

113 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results);
118 int l2nb, s64 * results);
122 int l2nb,
124 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb,
126 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno,
129 static int dbFindBits(u32 word, int l2nb);
130 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno);
131 static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx);
751 int l2nb; in dbAlloc() local
768 l2nb = BLKSTOL2(nblocks); in dbAlloc()
784 if (l2nb > bmp->db_agl2size) { in dbAlloc()
787 rc = dbAllocAny(bmp, nblocks, l2nb, results); in dbAlloc()
874 dbAllocNear(bmp, dp, blkno, (int) nblocks, l2nb, results)) in dbAlloc()
889 if ((rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results)) in dbAlloc()
909 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) in dbAlloc()
929 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) == -ENOSPC) in dbAlloc()
930 rc = dbAllocAny(bmp, nblocks, l2nb, results); in dbAlloc()
1334 struct dmap * dp, s64 blkno, int nblocks, int l2nb, s64 * results) in dbAllocNear() argument
1359 if (leaf[word] < l2nb) in dbAllocNear()
1374 dbFindBits(le32_to_cpu(dp->wmap[word]), l2nb); in dbAllocNear()
1443 dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) in dbAllocAG() argument
1454 if (l2nb > bmp->db_agl2size) { in dbAllocAG()
1485 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAG()
1534 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1543 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1579 if (l2nb < budmin) { in dbAllocAG()
1586 dbFindCtl(bmp, l2nb, bmp->db_aglevel - 1, in dbAllocAG()
1600 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAG()
1644 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results) in dbAllocAny() argument
1655 if ((rc = dbFindCtl(bmp, l2nb, bmp->db_maxlevel, &blkno))) in dbAllocAny()
1660 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); in dbAllocAny()
1698 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) in dbFindCtl() argument
1734 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
1762 if (l2nb >= budmin) in dbFindCtl()
1817 dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) in dbAllocCtl() argument
1826 if (l2nb <= L2BPERDMAP) { in dbAllocCtl()
1837 rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results); in dbAllocCtl()
1970 struct dmap * dp, int nblocks, int l2nb, s64 * results) in dbAllocDmapLev() argument
1976 assert(l2nb <= L2BPERDMAP); in dbAllocDmapLev()
1982 if (dbFindLeaf((dmtree_t *) & dp->tree, l2nb, &leafidx)) in dbAllocDmapLev()
1995 blkno += dbFindBits(le32_to_cpu(dp->wmap[leafidx]), l2nb); in dbAllocDmapLev()
2924 static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx) in dbFindLeaf() argument
2931 if (l2nb > tp->dmt_stree[ROOT]) in dbFindLeaf()
2947 if (l2nb <= tp->dmt_stree[x + n]) in dbFindLeaf()
2982 static int dbFindBits(u32 word, int l2nb) in dbFindBits() argument
2989 nb = 1 << l2nb; in dbFindBits()
3114 int l2nb; in blkstol2() local
3121 for (l2nb = 0; l2nb < 64; l2nb++, mask >>= 1) { in blkstol2()
3127 l2nb = (64 - 1) - l2nb; in blkstol2()
3132 l2nb++; in blkstol2()
3134 return (l2nb); in blkstol2()