Lines Matching refs:dcp
106 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1356 struct dmapctl *dcp; in dbAllocAG() local
1413 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1414 budmin = dcp->budmin; in dbAllocAG()
1416 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1442 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1451 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1475 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1718 struct dmapctl *dcp; in dbFindCtl() local
1735 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1736 budmin = dcp->budmin; in dbFindCtl()
1738 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1750 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
2501 struct dmapctl *dcp; in dbAdjCtl() local
2511 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2513 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2522 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2523 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2528 oldval = dcp->stree[ti]; in dbAdjCtl()
2529 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2551 rc = dbBackSplit((dmtree_t *) dcp, leafno); in dbAdjCtl()
2554 oldval = dcp->stree[ti]; in dbAdjCtl()
2556 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2558 rc = dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2570 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2579 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2586 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2595 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2597 dcp, leafno); in dbAdjCtl()
2598 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2599 dcp->budmin, oldval); in dbAdjCtl()
2617 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3957 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3961 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3962 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3963 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3964 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3965 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3972 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3977 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()