Lines Matching refs:dcp
119 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1369 struct dmapctl *dcp; in dbAllocAG() local
1426 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1427 budmin = dcp->budmin; in dbAllocAG()
1429 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1455 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1464 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1488 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1731 struct dmapctl *dcp; in dbFindCtl() local
1748 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1749 budmin = dcp->budmin; in dbFindCtl()
1751 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1763 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
2514 struct dmapctl *dcp; in dbAdjCtl() local
2524 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2526 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2535 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2536 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2541 oldval = dcp->stree[ti]; in dbAdjCtl()
2542 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2564 rc = dbBackSplit((dmtree_t *) dcp, leafno); in dbAdjCtl()
2567 oldval = dcp->stree[ti]; in dbAdjCtl()
2569 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2571 rc = dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2583 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2592 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2599 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2608 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2610 dcp, leafno); in dbAdjCtl()
2611 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2612 dcp->budmin, oldval); in dbAdjCtl()
2630 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3970 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3974 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3975 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3976 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3977 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3978 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3985 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3990 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()