Lines Matching refs:dcp
119 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1400 struct dmapctl *dcp; in dbAllocAG() local
1457 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1458 budmin = dcp->budmin; in dbAllocAG()
1460 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1486 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1495 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1519 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1762 struct dmapctl *dcp; in dbFindCtl() local
1779 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1780 budmin = dcp->budmin; in dbFindCtl()
1782 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1794 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
2548 struct dmapctl *dcp; in dbAdjCtl() local
2558 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2560 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2569 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2570 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2575 oldval = dcp->stree[ti]; in dbAdjCtl()
2576 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2598 rc = dbBackSplit((dmtree_t *) dcp, leafno); in dbAdjCtl()
2601 oldval = dcp->stree[ti]; in dbAdjCtl()
2603 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2605 rc = dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2617 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2626 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2633 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2642 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2644 dcp, leafno); in dbAdjCtl()
2645 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2646 dcp->budmin, oldval); in dbAdjCtl()
2664 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
4004 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
4008 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
4009 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
4010 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
4011 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
4012 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
4019 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
4024 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()