Lines Matching refs:dest_bi
30 struct buffer_info *dest_bi, in internal_define_dest_src_infos() argument
34 memset(dest_bi, 0, sizeof(struct buffer_info)); in internal_define_dest_src_infos()
45 dest_bi->tb = tb; in internal_define_dest_src_infos()
46 dest_bi->bi_bh = tb->L[h]; in internal_define_dest_src_infos()
47 dest_bi->bi_parent = tb->FL[h]; in internal_define_dest_src_infos()
48 dest_bi->bi_position = get_left_neighbor_position(tb, h); in internal_define_dest_src_infos()
57 dest_bi->tb = tb; in internal_define_dest_src_infos()
58 dest_bi->bi_bh = PATH_H_PBUFFER(tb->tb_path, h); in internal_define_dest_src_infos()
59 dest_bi->bi_parent = PATH_H_PPARENT(tb->tb_path, h); in internal_define_dest_src_infos()
61 dest_bi->bi_position = PATH_H_POSITION(tb->tb_path, h + 1); in internal_define_dest_src_infos()
72 dest_bi->tb = tb; in internal_define_dest_src_infos()
73 dest_bi->bi_bh = PATH_H_PBUFFER(tb->tb_path, h); in internal_define_dest_src_infos()
74 dest_bi->bi_parent = PATH_H_PPARENT(tb->tb_path, h); in internal_define_dest_src_infos()
75 dest_bi->bi_position = PATH_H_POSITION(tb->tb_path, h + 1); in internal_define_dest_src_infos()
85 dest_bi->tb = tb; in internal_define_dest_src_infos()
86 dest_bi->bi_bh = tb->R[h]; in internal_define_dest_src_infos()
87 dest_bi->bi_parent = tb->FR[h]; in internal_define_dest_src_infos()
88 dest_bi->bi_position = get_right_neighbor_position(tb, h); in internal_define_dest_src_infos()
94 dest_bi->tb = tb; in internal_define_dest_src_infos()
95 dest_bi->bi_bh = tb->L[h]; in internal_define_dest_src_infos()
96 dest_bi->bi_parent = tb->FL[h]; in internal_define_dest_src_infos()
97 dest_bi->bi_position = get_left_neighbor_position(tb, h); in internal_define_dest_src_infos()
101 dest_bi->tb = tb; in internal_define_dest_src_infos()
102 dest_bi->bi_bh = PATH_H_PBUFFER(tb->tb_path, h); in internal_define_dest_src_infos()
103 dest_bi->bi_parent = PATH_H_PPARENT(tb->tb_path, h); in internal_define_dest_src_infos()
104 dest_bi->bi_position = PATH_H_POSITION(tb->tb_path, h + 1); in internal_define_dest_src_infos()
108 dest_bi->tb = tb; in internal_define_dest_src_infos()
109 dest_bi->bi_bh = tb->R[h]; in internal_define_dest_src_infos()
110 dest_bi->bi_parent = tb->FR[h]; in internal_define_dest_src_infos()
111 dest_bi->bi_position = get_right_neighbor_position(tb, h); in internal_define_dest_src_infos()
298 static void internal_copy_pointers_items(struct buffer_info *dest_bi, in internal_copy_pointers_items() argument
307 struct buffer_head *dest = dest_bi->bi_bh; in internal_copy_pointers_items()
365 do_balance_mark_internal_dirty(dest_bi->tb, dest, 0); in internal_copy_pointers_items()
371 if (dest_bi->bi_parent) { in internal_copy_pointers_items()
373 t_dc = B_N_CHILD(dest_bi->bi_parent, dest_bi->bi_position); in internal_copy_pointers_items()
378 do_balance_mark_internal_dirty(dest_bi->tb, dest_bi->bi_parent, in internal_copy_pointers_items()
381 check_internal(dest_bi->bi_parent); in internal_copy_pointers_items()
394 static void internal_move_pointers_items(struct buffer_info *dest_bi, in internal_move_pointers_items() argument
402 internal_copy_pointers_items(dest_bi, src_bi->bi_bh, last_first, in internal_move_pointers_items()
429 static void internal_insert_key(struct buffer_info *dest_bi, in internal_insert_key() argument
434 struct buffer_head *dest = dest_bi->bi_bh; in internal_insert_key()
468 do_balance_mark_internal_dirty(dest_bi->tb, dest, 0); in internal_insert_key()
470 if (dest_bi->bi_parent) { in internal_insert_key()
472 t_dc = B_N_CHILD(dest_bi->bi_parent, dest_bi->bi_position); in internal_insert_key()
475 do_balance_mark_internal_dirty(dest_bi->tb, dest_bi->bi_parent, in internal_insert_key()
496 struct buffer_info dest_bi, src_bi; in internal_shift_left() local
500 internal_define_dest_src_infos(mode, tb, h, &dest_bi, &src_bi, in internal_shift_left()
510 internal_insert_key(&dest_bi, B_NR_ITEMS(dest_bi.bi_bh), cf, in internal_shift_left()
523 internal_move_pointers_items(&dest_bi, &src_bi, FIRST_TO_LAST, in internal_shift_left()
537 struct buffer_info dest_bi, src_bi; in internal_shift1_left() local
542 &dest_bi, &src_bi, &d_key_position, &cf); in internal_shift1_left()
546 internal_insert_key(&dest_bi, B_NR_ITEMS(dest_bi.bi_bh), cf, in internal_shift1_left()
550 internal_move_pointers_items(&dest_bi, &src_bi, FIRST_TO_LAST, in internal_shift1_left()
568 struct buffer_info dest_bi, src_bi; in internal_shift_right() local
573 internal_define_dest_src_infos(mode, tb, h, &dest_bi, &src_bi, in internal_shift_right()
583 internal_insert_key(&dest_bi, 0, cf, d_key_position); in internal_shift_right()
586 dest_bi.bi_bh != tb->R[h], in internal_shift_right()
599 internal_move_pointers_items(&dest_bi, &src_bi, LAST_TO_FIRST, in internal_shift_right()
612 struct buffer_info dest_bi, src_bi; in internal_shift1_right() local
617 &dest_bi, &src_bi, &d_key_position, &cf); in internal_shift1_right()
621 internal_insert_key(&dest_bi, 0, cf, d_key_position); in internal_shift1_right()
624 internal_move_pointers_items(&dest_bi, &src_bi, LAST_TO_FIRST, in internal_shift1_right()
1043 struct buffer_info dest_bi, src_bi; in balance_internal() local
1050 dest_bi.tb = tb; in balance_internal()
1051 dest_bi.bi_bh = S_new; in balance_internal()
1052 dest_bi.bi_parent = NULL; in balance_internal()
1053 dest_bi.bi_position = 0; in balance_internal()
1068 internal_move_pointers_items(&dest_bi, &src_bi, in balance_internal()
1081 internal_move_pointers_items(&dest_bi, &src_bi, in balance_internal()
1089 internal_insert_childs(&dest_bi, in balance_internal()
1102 internal_move_pointers_items(&dest_bi, &src_bi, in balance_internal()
1108 internal_insert_childs(&dest_bi, /*S_new, */ 0, k, in balance_internal()