/* Fills in a level of the btree based on the highs of the level below it.  */
static int setup_btree_index(unsigned int l, struct dm_table *t)
/* Fills in a level of the btree based on the highs of the level below it.  */
static int setup_btree_index(unsigned int l, struct dm_table *t)
{
	unsigned int n, k;
	sector_t *node;
	for (n = 0U; n < t->counts[l]; n++) {
		node = get_node(t, l, n);
		for (k = 0U; k < KEYS_PER_NODE; k++)
			node[k] = high(t, l + 1, get_child(n, k));
	}
	return 0;
}