Lines Matching full:dcp

106 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i);
1330 struct dmapctl *dcp; in dbAllocAG() local
1387 dcp = (struct dmapctl *) mp->data; in dbAllocAG()
1388 budmin = dcp->budmin; in dbAllocAG()
1390 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAllocAG()
1416 if (l2nb > dcp->stree[ti]) in dbAllocAG()
1425 if (l2nb <= dcp->stree[m + n]) { in dbAllocAG()
1449 ((s64) (ti - le32_to_cpu(dcp->leafidx))) << budmin; in dbAllocAG()
1694 struct dmapctl *dcp; in dbFindCtl() local
1711 dcp = (struct dmapctl *) mp->data; in dbFindCtl()
1712 budmin = dcp->budmin; in dbFindCtl()
1714 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbFindCtl()
1726 rc = dbFindLeaf((dmtree_t *) dcp, l2nb, &leafidx, true); in dbFindCtl()
2483 struct dmapctl *dcp; in dbAdjCtl() local
2493 dcp = (struct dmapctl *) mp->data; in dbAdjCtl()
2495 if (dcp->leafidx != cpu_to_le32(CTLLEAFIND)) { in dbAdjCtl()
2504 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2505 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2510 oldval = dcp->stree[ti]; in dbAdjCtl()
2511 oldroot = dcp->stree[ROOT]; in dbAdjCtl()
2533 rc = dbBackSplit((dmtree_t *)dcp, leafno, true); in dbAdjCtl()
2538 oldval = dcp->stree[ti]; in dbAdjCtl()
2540 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval, true); in dbAdjCtl()
2542 rc = dbJoin((dmtree_t *) dcp, leafno, newval, true); in dbAdjCtl()
2556 if (dcp->stree[ROOT] != oldroot) { in dbAdjCtl()
2565 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, in dbAdjCtl()
2572 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2581 if (dcp->stree[ti] == NOFREE) in dbAdjCtl()
2583 dcp, leafno, true); in dbAdjCtl()
2584 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2585 dcp->budmin, oldval, true); in dbAdjCtl()
2603 bmp->db_maxfreebud = dcp->stree[ROOT]; in dbAdjCtl()
3960 static int dbInitDmapCtl(struct dmapctl * dcp, int level, int i) in dbInitDmapCtl() argument
3964 dcp->nleafs = cpu_to_le32(LPERCTL); in dbInitDmapCtl()
3965 dcp->l2nleafs = cpu_to_le32(L2LPERCTL); in dbInitDmapCtl()
3966 dcp->leafidx = cpu_to_le32(CTLLEAFIND); in dbInitDmapCtl()
3967 dcp->height = cpu_to_le32(5); in dbInitDmapCtl()
3968 dcp->budmin = L2BPERDMAP + L2LPERCTL * level; in dbInitDmapCtl()
3975 cp = &dcp->stree[CTLLEAFIND + i]; in dbInitDmapCtl()
3980 return (dbInitTree((struct dmaptree *) dcp)); in dbInitDmapCtl()