Lines Matching refs:dcp

106 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1312 struct dmapctl *dcp; in dbAllocAG() local
1369 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1370 budmin = dcp->budmin; in dbAllocAG()
1372 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1398 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1407 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1431 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1674 struct dmapctl *dcp; in dbFindCtl() local
1691 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1692 budmin = dcp->budmin; in dbFindCtl()
1694 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1706 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx); in dbFindCtl()
2457 struct dmapctl *dcp; in dbAdjCtl() local
2467 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2469 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2478 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2479 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2484 oldval = dcp->stree[ti]; in dbAdjCtl()
2485 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2507 rc = dbBackSplit((dmtree_t *) dcp, leafno); in dbAdjCtl()
2512 oldval = dcp->stree[ti]; in dbAdjCtl()
2514 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2516 rc = dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2530 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2539 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2546 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2555 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2557 dcp, leafno); in dbAdjCtl()
2558 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2559 dcp->budmin, oldval); in dbAdjCtl()
2577 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3917 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3921 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3922 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3923 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3924 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3925 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3932 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3937 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()