Lines Matching refs:my_rsv
667 struct ext2_reserve_window *my_rsv) in ext2_try_to_allocate() argument
674 if (my_rsv) { in ext2_try_to_allocate()
676 if (my_rsv->_rsv_start >= group_first_block) in ext2_try_to_allocate()
677 start = my_rsv->_rsv_start - group_first_block; in ext2_try_to_allocate()
681 end = my_rsv->_rsv_end - group_first_block + 1; in ext2_try_to_allocate()
704 if (!my_rsv) { in ext2_try_to_allocate()
778 struct ext2_reserve_window_node *my_rsv, in find_next_reservable_window() argument
786 int size = my_rsv->rsv_goal_size; in find_next_reservable_window()
841 if ((prev != my_rsv) && (!rsv_is_empty(&my_rsv->rsv_window))) in find_next_reservable_window()
842 rsv_window_remove(sb, my_rsv); in find_next_reservable_window()
851 my_rsv->rsv_start = cur; in find_next_reservable_window()
852 my_rsv->rsv_end = cur + size - 1; in find_next_reservable_window()
853 my_rsv->rsv_alloc_hit = 0; in find_next_reservable_window()
855 if (prev != my_rsv) in find_next_reservable_window()
856 ext2_rsv_window_add(sb, my_rsv); in find_next_reservable_window()
898 static int alloc_new_reservation(struct ext2_reserve_window_node *my_rsv, in alloc_new_reservation() argument
918 size = my_rsv->rsv_goal_size; in alloc_new_reservation()
920 if (!rsv_is_empty(&my_rsv->rsv_window)) { in alloc_new_reservation()
935 if ((my_rsv->rsv_start <= group_end_block) && in alloc_new_reservation()
936 (my_rsv->rsv_end > group_end_block) && in alloc_new_reservation()
937 (start_block >= my_rsv->rsv_start)) in alloc_new_reservation()
940 if ((my_rsv->rsv_alloc_hit > in alloc_new_reservation()
941 (my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) { in alloc_new_reservation()
951 my_rsv->rsv_goal_size= size; in alloc_new_reservation()
969 ret = find_next_reservable_window(search_head, my_rsv, sb, in alloc_new_reservation()
973 if (!rsv_is_empty(&my_rsv->rsv_window)) in alloc_new_reservation()
974 rsv_window_remove(sb, my_rsv); in alloc_new_reservation()
990 my_rsv->rsv_start - group_first_block, in alloc_new_reservation()
999 if (!rsv_is_empty(&my_rsv->rsv_window)) in alloc_new_reservation()
1000 rsv_window_remove(sb, my_rsv); in alloc_new_reservation()
1010 if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end) in alloc_new_reservation()
1018 search_head = my_rsv; in alloc_new_reservation()
1040 static void try_to_extend_reservation(struct ext2_reserve_window_node *my_rsv, in try_to_extend_reservation() argument
1050 next = rb_next(&my_rsv->rsv_node); in try_to_extend_reservation()
1053 my_rsv->rsv_end += size; in try_to_extend_reservation()
1057 if ((next_rsv->rsv_start - my_rsv->rsv_end - 1) >= size) in try_to_extend_reservation()
1058 my_rsv->rsv_end += size; in try_to_extend_reservation()
1060 my_rsv->rsv_end = next_rsv->rsv_start - 1; in try_to_extend_reservation()
1094 struct ext2_reserve_window_node * my_rsv, in ext2_try_to_allocate_with_rsv() argument
1107 if (my_rsv == NULL) { in ext2_try_to_allocate_with_rsv()
1136 if (rsv_is_empty(&my_rsv->rsv_window) || (ret < 0) || in ext2_try_to_allocate_with_rsv()
1137 !goal_in_my_reservation(&my_rsv->rsv_window, in ext2_try_to_allocate_with_rsv()
1139 if (my_rsv->rsv_goal_size < *count) in ext2_try_to_allocate_with_rsv()
1140 my_rsv->rsv_goal_size = *count; in ext2_try_to_allocate_with_rsv()
1141 ret = alloc_new_reservation(my_rsv, grp_goal, sb, in ext2_try_to_allocate_with_rsv()
1146 if (!goal_in_my_reservation(&my_rsv->rsv_window, in ext2_try_to_allocate_with_rsv()
1150 int curr = my_rsv->rsv_end - in ext2_try_to_allocate_with_rsv()
1154 try_to_extend_reservation(my_rsv, sb, in ext2_try_to_allocate_with_rsv()
1158 if ((my_rsv->rsv_start > group_last_block) || in ext2_try_to_allocate_with_rsv()
1159 (my_rsv->rsv_end < group_first_block)) { in ext2_try_to_allocate_with_rsv()
1164 &num, &my_rsv->rsv_window); in ext2_try_to_allocate_with_rsv()
1166 my_rsv->rsv_alloc_hit += num; in ext2_try_to_allocate_with_rsv()
1227 struct ext2_reserve_window_node *my_rsv = NULL; in ext2_new_blocks() local
1261 my_rsv = &block_i->rsv_window_node; in ext2_new_blocks()
1288 if (my_rsv && (free_blocks < windowsz) in ext2_new_blocks()
1290 && (rsv_is_empty(&my_rsv->rsv_window))) in ext2_new_blocks()
1291 my_rsv = NULL; in ext2_new_blocks()
1301 my_rsv, &num); in ext2_new_blocks()
1333 if (my_rsv && (free_blocks <= (windowsz/2))) in ext2_new_blocks()
1344 bitmap_bh, -1, my_rsv, &num); in ext2_new_blocks()
1355 if (my_rsv) { in ext2_new_blocks()
1356 my_rsv = NULL; in ext2_new_blocks()