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()
2556 oldval = dcp->stree[ti]; in dbAdjCtl()
2558 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2560 rc = dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2574 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2583 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2590 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2599 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2601 dcp, leafno); in dbAdjCtl()
2602 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2603 dcp->budmin, oldval); in dbAdjCtl()
2621 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3961 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3965 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3966 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3967 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3968 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3969 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3976 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3981 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()