Lines Matching refs:vn_nr_item
66 vn->vn_nr_item = (vn->vn_size - DC_SIZE) / (DC_SIZE + KEY_SIZE); in create_virtual_node()
71 vn->vn_nr_item = in create_virtual_node()
77 memset(vn->vn_vi, 0, vn->vn_nr_item * sizeof(struct virtual_item)); in create_virtual_node()
78 vn->vn_free_ptr += vn->vn_nr_item * sizeof(struct virtual_item); in create_virtual_node()
92 for (new_num = 0; new_num < vn->vn_nr_item; new_num++) { in create_virtual_node()
157 vn->vn_vi[vn->vn_nr_item - 1].vi_type |= in create_virtual_node()
211 if (!cur_free || !vn->vn_nr_item) { in check_left()
230 tb->lnum[0] = vn->vn_nr_item; in check_left()
242 for (i = 0; i < vn->vn_nr_item; in check_left()
297 if (!cur_free || !vn->vn_nr_item) { in check_right()
307 vi = vn->vn_vi + vn->vn_nr_item - 1; in check_right()
316 tb->rnum[h] = vn->vn_nr_item; in check_right()
328 for (i = vn->vn_nr_item - 1; i >= 0; in check_right()
447 end_item = vn->vn_nr_item - to - 1; in get_num_ver()
665 remain_items = vn->vn_nr_item; in is_leaf_removable()
672 set_parameters(tb, 0, to_left, vn->vn_nr_item - to_left, 0, in is_leaf_removable()
705 if (vn->vn_nr_item) { in are_leaves_removable()
709 if (vn->vn_vi[vn->vn_nr_item - 1]. in are_leaves_removable()
763 to_l = (MAX_NR_KEY(Sh)+1 - lpar + vn->vn_nr_item + 1) / 2 -\
783 to_r = (MAX_NR_KEY(Sh)+1 - rpar + vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - rpar);\
1434 if (h && (tb->rnum[h] + tb->lnum[h] >= vn->vn_nr_item + 1)) { in ip_check_balance()
1447 vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - in ip_check_balance()
1449 set_parameters(tb, h, vn->vn_nr_item + 1 - to_r, to_r, 0, NULL, in ip_check_balance()
1459 (tb->lnum[h] >= vn->vn_nr_item + 1 || in ip_check_balance()
1460 tb->rnum[h] >= vn->vn_nr_item + 1), in ip_check_balance()
1462 RFALSE(!h && ((tb->lnum[h] >= vn->vn_nr_item && (tb->lbytes == -1)) || in ip_check_balance()
1463 (tb->rnum[h] >= vn->vn_nr_item && (tb->rbytes == -1))), in ip_check_balance()
1483 tb->s0num = vn->vn_nr_item; in ip_check_balance()
1524 0, -1, h ? vn->vn_nr_item : 0, -1, in ip_check_balance()
1552 -1, h ? vn->vn_nr_item : 0, -1, in ip_check_balance()
1577 h ? (vn->vn_nr_item - rpar) : (rpar - in ip_check_balance()
1608 h ? (vn->vn_nr_item - rpar) : (rpar - in ip_check_balance()
1751 if (vn->vn_nr_item > 0) { in dc_check_balance_internal()
1779 if (vn->vn_nr_item >= MIN_NR_KEY(Sh)) { in dc_check_balance_internal()
1784 if (vn->vn_nr_item == MIN_NR_KEY(Sh)) { in dc_check_balance_internal()
1786 if (tb->lnum[h] >= vn->vn_nr_item + 1) { in dc_check_balance_internal()
1803 if (tb->rnum[h] >= vn->vn_nr_item + 1) { in dc_check_balance_internal()
1824 if (tb->rnum[h] + tb->lnum[h] >= vn->vn_nr_item + 1) { in dc_check_balance_internal()
1829 tb->rnum[h] + vn->vn_nr_item + 1) / 2 - in dc_check_balance_internal()
1831 set_parameters(tb, h, vn->vn_nr_item + 1 - to_r, to_r, in dc_check_balance_internal()
1846 if (tb->lnum[h] >= vn->vn_nr_item + 1) in dc_check_balance_internal()
1848 || tb->rnum[h] < vn->vn_nr_item + 1 || !tb->FR[h]) { in dc_check_balance_internal()
1864 if (tb->rnum[h] >= vn->vn_nr_item + 1) { in dc_check_balance_internal()
1879 if (tb->rnum[h] + tb->lnum[h] >= vn->vn_nr_item + 1) { in dc_check_balance_internal()
1884 vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - in dc_check_balance_internal()
1886 set_parameters(tb, h, vn->vn_nr_item + 1 - to_r, to_r, 0, NULL, in dc_check_balance_internal()
1899 (MAX_NR_KEY(Sh) + 1 - tb->lnum[h] + vn->vn_nr_item + in dc_check_balance_internal()
1900 1) / 2 - (vn->vn_nr_item + 1); in dc_check_balance_internal()
1906 -((MAX_NR_KEY(Sh) + 1 - tb->rnum[h] + vn->vn_nr_item + in dc_check_balance_internal()
1907 1) / 2 - (vn->vn_nr_item + 1)), 1, NULL, -1, -1); in dc_check_balance_internal()
1986 if (tb->lnum[0] >= vn->vn_nr_item && tb->lbytes == -1) in dc_check_balance_leaf()
1987 …in_cache(tb, h) || ((tb->rnum[0] - ((tb->rbytes == -1) ? 0 : 1)) < vn->vn_nr_item) || /* S can not… in dc_check_balance_leaf()
1999 if (tb->rnum[0] >= vn->vn_nr_item && tb->rbytes == -1) { in dc_check_balance_leaf()
2012 tb->s0num = vn->vn_nr_item; in dc_check_balance_leaf()