Lines Matching refs:my_rsv

669 			struct ext2_reserve_window *my_rsv)  in ext2_try_to_allocate()  argument
676 if (my_rsv) { in ext2_try_to_allocate()
678 if (my_rsv->_rsv_start >= group_first_block) in ext2_try_to_allocate()
679 start = my_rsv->_rsv_start - group_first_block; in ext2_try_to_allocate()
683 end = my_rsv->_rsv_end - group_first_block + 1; in ext2_try_to_allocate()
706 if (!my_rsv) { in ext2_try_to_allocate()
780 struct ext2_reserve_window_node *my_rsv, in find_next_reservable_window() argument
788 int size = my_rsv->rsv_goal_size; in find_next_reservable_window()
843 if ((prev != my_rsv) && (!rsv_is_empty(&my_rsv->rsv_window))) in find_next_reservable_window()
844 rsv_window_remove(sb, my_rsv); in find_next_reservable_window()
853 my_rsv->rsv_start = cur; in find_next_reservable_window()
854 my_rsv->rsv_end = cur + size - 1; in find_next_reservable_window()
855 my_rsv->rsv_alloc_hit = 0; in find_next_reservable_window()
857 if (prev != my_rsv) in find_next_reservable_window()
858 ext2_rsv_window_add(sb, my_rsv); in find_next_reservable_window()
900 static int alloc_new_reservation(struct ext2_reserve_window_node *my_rsv, in alloc_new_reservation() argument
920 size = my_rsv->rsv_goal_size; in alloc_new_reservation()
922 if (!rsv_is_empty(&my_rsv->rsv_window)) { in alloc_new_reservation()
937 if ((my_rsv->rsv_start <= group_end_block) && in alloc_new_reservation()
938 (my_rsv->rsv_end > group_end_block) && in alloc_new_reservation()
939 (start_block >= my_rsv->rsv_start)) in alloc_new_reservation()
942 if ((my_rsv->rsv_alloc_hit > in alloc_new_reservation()
943 (my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) { in alloc_new_reservation()
953 my_rsv->rsv_goal_size= size; in alloc_new_reservation()
971 ret = find_next_reservable_window(search_head, my_rsv, sb, in alloc_new_reservation()
975 if (!rsv_is_empty(&my_rsv->rsv_window)) in alloc_new_reservation()
976 rsv_window_remove(sb, my_rsv); in alloc_new_reservation()
992 my_rsv->rsv_start - group_first_block, in alloc_new_reservation()
1001 if (!rsv_is_empty(&my_rsv->rsv_window)) in alloc_new_reservation()
1002 rsv_window_remove(sb, my_rsv); in alloc_new_reservation()
1012 if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end) in alloc_new_reservation()
1020 search_head = my_rsv; in alloc_new_reservation()
1042 static void try_to_extend_reservation(struct ext2_reserve_window_node *my_rsv, in try_to_extend_reservation() argument
1052 next = rb_next(&my_rsv->rsv_node); in try_to_extend_reservation()
1055 my_rsv->rsv_end += size; in try_to_extend_reservation()
1059 if ((next_rsv->rsv_start - my_rsv->rsv_end - 1) >= size) in try_to_extend_reservation()
1060 my_rsv->rsv_end += size; in try_to_extend_reservation()
1062 my_rsv->rsv_end = next_rsv->rsv_start - 1; in try_to_extend_reservation()
1096 struct ext2_reserve_window_node * my_rsv, in ext2_try_to_allocate_with_rsv() argument
1109 if (my_rsv == NULL) { in ext2_try_to_allocate_with_rsv()
1138 if (rsv_is_empty(&my_rsv->rsv_window) || (ret < 0) || in ext2_try_to_allocate_with_rsv()
1139 !goal_in_my_reservation(&my_rsv->rsv_window, in ext2_try_to_allocate_with_rsv()
1141 if (my_rsv->rsv_goal_size < *count) in ext2_try_to_allocate_with_rsv()
1142 my_rsv->rsv_goal_size = *count; in ext2_try_to_allocate_with_rsv()
1143 ret = alloc_new_reservation(my_rsv, grp_goal, sb, in ext2_try_to_allocate_with_rsv()
1148 if (!goal_in_my_reservation(&my_rsv->rsv_window, in ext2_try_to_allocate_with_rsv()
1152 int curr = my_rsv->rsv_end - in ext2_try_to_allocate_with_rsv()
1156 try_to_extend_reservation(my_rsv, sb, in ext2_try_to_allocate_with_rsv()
1160 if ((my_rsv->rsv_start > group_last_block) || in ext2_try_to_allocate_with_rsv()
1161 (my_rsv->rsv_end < group_first_block)) { in ext2_try_to_allocate_with_rsv()
1166 &num, &my_rsv->rsv_window); in ext2_try_to_allocate_with_rsv()
1168 my_rsv->rsv_alloc_hit += num; in ext2_try_to_allocate_with_rsv()
1250 struct ext2_reserve_window_node *my_rsv = NULL; in ext2_new_blocks() local
1284 my_rsv = &block_i->rsv_window_node; in ext2_new_blocks()
1311 if (my_rsv && (free_blocks < windowsz) in ext2_new_blocks()
1313 && (rsv_is_empty(&my_rsv->rsv_window))) in ext2_new_blocks()
1314 my_rsv = NULL; in ext2_new_blocks()
1324 my_rsv, &num); in ext2_new_blocks()
1356 if (my_rsv && (free_blocks <= (windowsz/2))) in ext2_new_blocks()
1367 bitmap_bh, -1, my_rsv, &num); in ext2_new_blocks()
1378 if (my_rsv) { in ext2_new_blocks()
1379 my_rsv = NULL; in ext2_new_blocks()