Lines Matching refs:dcp

106 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1364 struct dmapctl *dcp; in dbAllocAG() local
1421 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1422 budmin = dcp->budmin; in dbAllocAG()
1424 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1450 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1459 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1483 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1726 struct dmapctl *dcp; in dbFindCtl() local
1743 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1744 budmin = dcp->budmin; in dbFindCtl()
1746 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1758 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
2509 struct dmapctl *dcp; in dbAdjCtl() local
2519 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2521 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2530 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2531 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2536 oldval = dcp->stree[ti]; in dbAdjCtl()
2537 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2559 rc = dbBackSplit((dmtree_t *) dcp, leafno); in dbAdjCtl()
2562 oldval = dcp->stree[ti]; in dbAdjCtl()
2564 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2566 rc = dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2578 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2587 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2594 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2603 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2605 dcp, leafno); in dbAdjCtl()
2606 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2607 dcp->budmin, oldval); in dbAdjCtl()
2625 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3965 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3969 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3970 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3971 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3972 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3973 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3980 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3985 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()