Lines Matching full:dcp

106 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1326 struct dmapctl *dcp; in dbAllocAG() local
1383 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1384 budmin = dcp->budmin; in dbAllocAG()
1386 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1412 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1421 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1445 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1690 struct dmapctl *dcp; in dbFindCtl() local
1707 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1708 budmin = dcp->budmin; in dbFindCtl()
1710 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1722 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx, true); in dbFindCtl()
2476 struct dmapctl *dcp; in dbAdjCtl() local
2486 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2488 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2497 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2498 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2503 oldval = dcp->stree[ti]; in dbAdjCtl()
2504 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2526 rc = dbBackSplit((dmtree_t *)dcp, leafno, true); in dbAdjCtl()
2531 oldval = dcp->stree[ti]; in dbAdjCtl()
2533 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval, true); in dbAdjCtl()
2535 rc = dbJoin((dmtree_t *) dcp, leafno, newval, true); in dbAdjCtl()
2549 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2558 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2565 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2574 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2576 dcp, leafno, true); in dbAdjCtl()
2577 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2578 dcp->budmin, oldval, true); in dbAdjCtl()
2596 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3950 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3954 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3955 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3956 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3957 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3958 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3965 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3970 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()