Lines Matching refs:leafno
107 static void dbSplit(dmtree_t * tp, int leafno, int splitsz, int newval);
108 static void dbBackSplit(dmtree_t * tp, int leafno);
109 static void dbJoin(dmtree_t * tp, int leafno, int newval);
110 static void dbAdjTree(dmtree_t * tp, int leafno, int newval);
2480 int rc, leafno, ti; in dbAdjCtl() local
2501 leafno = BLKTOCTLLEAF(blkno, dcp->budmin); in dbAdjCtl()
2502 ti = leafno + le32_to_cpu(dcp->leafidx); in dbAdjCtl()
2530 dbBackSplit((dmtree_t *) dcp, leafno); in dbAdjCtl()
2533 dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval); in dbAdjCtl()
2535 dbJoin((dmtree_t *) dcp, leafno, newval); in dbAdjCtl()
2561 dbJoin((dmtree_t *) dcp, leafno, in dbAdjCtl()
2572 dcp, leafno); in dbAdjCtl()
2573 dbSplit((dmtree_t *) dcp, leafno, in dbAdjCtl()
2623 static void dbSplit(dmtree_t * tp, int leafno, int splitsz, int newval) in dbSplit() argument
2631 if (leaf[leafno] > tp->dmt_budmin) { in dbSplit()
2637 cursz = leaf[leafno] - 1; in dbSplit()
2645 dbAdjTree(tp, leafno ^ budsz, cursz); in dbSplit()
2657 dbAdjTree(tp, leafno, newval); in dbSplit()
2688 static void dbBackSplit(dmtree_t * tp, int leafno) in dbBackSplit() argument
2697 assert(leaf[leafno] == NOFREE); in dbBackSplit()
2707 LITOL2BSZ(leafno, le32_to_cpu(tp->dmt_l2nleafs), in dbBackSplit()
2718 while (leaf[leafno] == NOFREE) { in dbBackSplit()
2721 for (w = leafno, bsz = budsz;; bsz <<= 1, in dbBackSplit()
2742 assert(leaf[leafno] == size); in dbBackSplit()
2760 static void dbJoin(dmtree_t * tp, int leafno, int newval) in dbJoin() argument
2792 buddy = leafno ^ budsz; in dbJoin()
2810 if (leafno < buddy) { in dbJoin()
2818 dbAdjTree(tp, leafno, NOFREE); in dbJoin()
2819 leafno = buddy; in dbJoin()
2831 dbAdjTree(tp, leafno, newval); in dbJoin()
2850 static void dbAdjTree(dmtree_t * tp, int leafno, int newval) in dbAdjTree() argument
2857 lp = leafno + le32_to_cpu(tp->dmt_leafidx); in dbAdjTree()