Lines Matching refs:depth
872 int depth; in block_tree_check_sub_tree() local
887 depth = 1; in block_tree_check_sub_tree()
988 if (depth == 1) { in block_tree_check_sub_tree()
989 depth = -2; in block_tree_check_sub_tree()
991 } else if (depth == 1 || depth == -2) { in block_tree_check_sub_tree()
992 depth = sub_tree_depth + 1; in block_tree_check_sub_tree()
993 } else if (sub_tree_depth != depth - 1) { in block_tree_check_sub_tree()
996 sub_tree_depth, depth - 1); in block_tree_check_sub_tree()
1024 if (depth == 1) { in block_tree_check_sub_tree()
1025 depth = -2; in block_tree_check_sub_tree()
1027 } else if (depth == 1 || depth == -2) { in block_tree_check_sub_tree()
1028 depth = sub_tree_depth + 1; in block_tree_check_sub_tree()
1029 } else if (sub_tree_depth != depth - 1) { in block_tree_check_sub_tree()
1032 sub_tree_depth, depth - 1); in block_tree_check_sub_tree()
1047 return depth; in block_tree_check_sub_tree()
1402 unsigned int depth; in block_tree_path_next() local
1413 depth = path->count - 1; in block_tree_path_next()
1414 assert(path->entry[depth].next_key); in block_tree_path_next()
1421 block_mac = &path->entry[depth].block_mac; in block_tree_path_next()
1422 index = path->entry[depth].index; in block_tree_path_next()
1423 parent_next_key = depth > 0 ? path->entry[depth - 1].next_key : 0; in block_tree_path_next()
1445 assert(path->entry[depth].next_key == prev_key || !prev_key); in block_tree_path_next()
1449 path->entry[depth].index = index; in block_tree_path_next()
1450 path->entry[depth].prev_key = prev_key; in block_tree_path_next()
1451 path->entry[depth].next_key = next_key; in block_tree_path_next()
1456 __func__, depth, in block_tree_path_next()
1457 block_mac_to_block(path->tr, &path->entry[depth].block_mac), in block_tree_path_next()
1458 path->entry[depth].index, path->entry[depth].prev_key, in block_tree_path_next()
1459 path->entry[depth].next_key); in block_tree_path_next()
1466 assert(depth > 0); in block_tree_path_next()
1468 while (depth > 0) { in block_tree_path_next()
1469 depth--; in block_tree_path_next()
1470 if (!path->entry[depth].next_key) { in block_tree_path_next()
1473 block_mac = &path->entry[depth].block_mac; in block_tree_path_next()
1474 index = path->entry[depth].index; in block_tree_path_next()
1485 parent_next_key = depth > 0 ? path->entry[depth - 1].next_key : 0; in block_tree_path_next()
1500 assert(prev_key && prev_key == path->entry[depth].next_key); in block_tree_path_next()
1501 path->entry[depth].index = index; in block_tree_path_next()
1502 path->entry[depth].prev_key = prev_key; in block_tree_path_next()
1503 path->entry[depth].next_key = next_key ?: parent_next_key; in block_tree_path_next()
1507 __func__, depth, in block_tree_path_next()
1509 &path->entry[depth].block_mac), in block_tree_path_next()
1510 path->entry[depth].index, path->entry[depth].prev_key, in block_tree_path_next()
1511 path->entry[depth].next_key); in block_tree_path_next()
1518 while (++depth < path->count - 1) { in block_tree_path_next()
1527 path->entry[depth].block_mac = *next_child; in block_tree_path_next()
1529 path->entry[depth].index = 0; in block_tree_path_next()
1530 path->entry[depth].prev_key = prev_key; in block_tree_path_next()
1531 path->entry[depth].next_key = block_tree_node_get_key( in block_tree_path_next()
1536 __func__, depth, in block_tree_path_next()
1537 block_mac_to_block(path->tr, &path->entry[depth].block_mac), in block_tree_path_next()
1538 path->entry[depth].index, path->entry[depth].prev_key, in block_tree_path_next()
1539 path->entry[depth].next_key); in block_tree_path_next()
1545 assert(path->entry[depth].next_key); in block_tree_path_next()
1558 path->entry[depth].block_mac = *next_child; in block_tree_path_next()
1560 path->entry[depth].index = 0; in block_tree_path_next()
1561 path->entry[depth].prev_key = prev_key; in block_tree_path_next()
1562 path->entry[depth].next_key = in block_tree_path_next()
1567 assert(path->entry[depth].next_key); in block_tree_path_next()
1571 __func__, depth, in block_tree_path_next()
1572 block_mac_to_block(path->tr, &path->entry[depth].block_mac), in block_tree_path_next()
1573 path->entry[depth].index, path->entry[depth].prev_key, in block_tree_path_next()
1574 path->entry[depth].next_key); in block_tree_path_next()
3088 int depth; in block_tree_check_config() local
3113 for (depth = 1; depth <= BLOCK_TREE_MAX_DEPTH; depth++) { in block_tree_check_config()
3114 if (depth == 1) { in block_tree_check_config()
3117 } else if (depth == 2) { in block_tree_check_config()
3124 depth, tree_min_entry_count, tree_max_entry_count, in block_tree_check_config()
3125 2.0 * pow(ceil(node_max_child_count / 2.0), depth - 1), in block_tree_check_config()
3126 pow(node_max_child_count, depth) - in block_tree_check_config()
3127 pow(node_max_child_count, depth - 1)); in block_tree_check_config()