Lines Matching refs:Sh

56 	struct buffer_head *Sh;	/* this comes from tb->S[h] */  in create_virtual_node()  local
58 Sh = PATH_H_PBUFFER(tb->tb_path, h); in create_virtual_node()
62 MAX_CHILD_SIZE(Sh) - B_FREE_SPACE(Sh) + tb->insert_size[h]; in create_virtual_node()
72 B_NR_ITEMS(Sh) + ((vn->vn_mode == M_INSERT) ? 1 : 0) - in create_virtual_node()
81 ih = item_head(Sh, 0); in create_virtual_node()
84 if (op_is_left_mergeable(&ih->ih_key, Sh->b_size) in create_virtual_node()
107 vi->vi_item = ih_item_body(Sh, ih + j); in create_virtual_node()
154 if (op_is_left_mergeable(key, Sh->b_size) in create_virtual_node()
156 || vn->vn_affected_item_num != B_NR_ITEMS(Sh) - 1)) in create_virtual_node()
161 if (op_is_left_mergeable(key, Sh->b_size) && in create_virtual_node()
163 || vn->vn_affected_item_num != B_NR_ITEMS(Sh) - 1)) { in create_virtual_node()
169 (B_NR_ITEMS(Sh) == 1 in create_virtual_node()
170 && is_direntry_le_ih(item_head(Sh, 0)) in create_virtual_node()
171 && ih_entry_count(item_head(Sh, 0)) == 1)) { in create_virtual_node()
177 print_block(Sh, 0, -1, -1); in create_virtual_node()
763 to_l = (MAX_NR_KEY(Sh)+1 - lpar + vn->vn_nr_item + 1) / 2 -\
764 (MAX_NR_KEY(Sh) + 1 - lpar);\
783 to_r = (MAX_NR_KEY(Sh)+1 - rpar + vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - rpar);\
829 struct buffer_head *new_bh, *Sh = PATH_H_PBUFFER(tb->tb_path, h); in get_empty_nodes() local
865 amount_needed = (Sh) ? (tb->blknum[h] - 1) : 1; in get_empty_nodes()
1276 struct buffer_head *Sh = PATH_H_PBUFFER(tb->tb_path, h); in can_node_be_removed() local
1281 ih = item_head(Sh, 0); in can_node_be_removed()
1285 if (lfree + rfree + sfree < MAX_CHILD_SIZE(Sh) + levbytes in can_node_be_removed()
1289 && op_is_left_mergeable(&ih->ih_key, Sh->b_size)) ? IH_SIZE : 0) in can_node_be_removed()
1292 && op_is_left_mergeable(r_key, Sh->b_size)) ? IH_SIZE : 0) in can_node_be_removed()
1299 B_NR_ITEMS(Sh) + in can_node_be_removed()
1371 struct buffer_head *Sh; in ip_check_balance() local
1373 Sh = PATH_H_PBUFFER(tb->tb_path, h); in ip_check_balance()
1377 if (!Sh) { in ip_check_balance()
1401 sfree = B_FREE_SPACE(Sh); in ip_check_balance()
1446 ((MAX_NR_KEY(Sh) << 1) + 2 - tb->lnum[h] - tb->rnum[h] + in ip_check_balance()
1447 vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - in ip_check_balance()
1734 struct buffer_head *Sh, *Fh; in dc_check_balance_internal() local
1738 Sh = PATH_H_PBUFFER(tb->tb_path, h); 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()
1828 ((MAX_NR_KEY(Sh) << 1) + 2 - tb->lnum[h] - in dc_check_balance_internal()
1830 (MAX_NR_KEY(Sh) + 1 - tb->rnum[h]); in dc_check_balance_internal()
1883 ((MAX_NR_KEY(Sh) << 1) + 2 - tb->lnum[h] - tb->rnum[h] + in dc_check_balance_internal()
1884 vn->vn_nr_item + 1) / 2 - (MAX_NR_KEY(Sh) + 1 - in dc_check_balance_internal()
1899 (MAX_NR_KEY(Sh) + 1 - tb->lnum[h] + vn->vn_nr_item + in dc_check_balance_internal()
1906 -((MAX_NR_KEY(Sh) + 1 - tb->rnum[h] + vn->vn_nr_item + in dc_check_balance_internal()