Lines Matching refs:my_rsv

665 			struct ext2_reserve_window *my_rsv)  in ext2_try_to_allocate()  argument
675 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()
678 if (my_rsv->_rsv_end < group_last_block) in ext2_try_to_allocate()
679 end = my_rsv->_rsv_end - group_first_block + 1; in ext2_try_to_allocate()
689 if (!my_rsv) { in ext2_try_to_allocate()
753 struct ext2_reserve_window_node *my_rsv, in find_next_reservable_window() argument
761 int size = my_rsv->rsv_goal_size; in find_next_reservable_window()
816 if ((prev != my_rsv) && (!rsv_is_empty(&my_rsv->rsv_window))) in find_next_reservable_window()
817 rsv_window_remove(sb, my_rsv); in find_next_reservable_window()
826 my_rsv->rsv_start = cur; in find_next_reservable_window()
827 my_rsv->rsv_end = cur + size - 1; in find_next_reservable_window()
828 my_rsv->rsv_alloc_hit = 0; in find_next_reservable_window()
830 if (prev != my_rsv) in find_next_reservable_window()
831 ext2_rsv_window_add(sb, my_rsv); in find_next_reservable_window()
873 static int alloc_new_reservation(struct ext2_reserve_window_node *my_rsv, in alloc_new_reservation() argument
893 size = my_rsv->rsv_goal_size; in alloc_new_reservation()
895 if (!rsv_is_empty(&my_rsv->rsv_window)) { in alloc_new_reservation()
910 if ((my_rsv->rsv_start <= group_end_block) && in alloc_new_reservation()
911 (my_rsv->rsv_end > group_end_block) && in alloc_new_reservation()
912 (start_block >= my_rsv->rsv_start)) in alloc_new_reservation()
915 if ((my_rsv->rsv_alloc_hit > in alloc_new_reservation()
916 (my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) { in alloc_new_reservation()
926 my_rsv->rsv_goal_size= size; in alloc_new_reservation()
944 ret = find_next_reservable_window(search_head, my_rsv, sb, in alloc_new_reservation()
948 if (!rsv_is_empty(&my_rsv->rsv_window)) in alloc_new_reservation()
949 rsv_window_remove(sb, my_rsv); in alloc_new_reservation()
965 my_rsv->rsv_start - group_first_block, in alloc_new_reservation()
974 if (!rsv_is_empty(&my_rsv->rsv_window)) in alloc_new_reservation()
975 rsv_window_remove(sb, my_rsv); in alloc_new_reservation()
985 if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end) in alloc_new_reservation()
993 search_head = my_rsv; in alloc_new_reservation()
1015 static void try_to_extend_reservation(struct ext2_reserve_window_node *my_rsv, in try_to_extend_reservation() argument
1025 next = rb_next(&my_rsv->rsv_node); in try_to_extend_reservation()
1028 my_rsv->rsv_end += size; in try_to_extend_reservation()
1032 if ((next_rsv->rsv_start - my_rsv->rsv_end - 1) >= size) in try_to_extend_reservation()
1033 my_rsv->rsv_end += size; in try_to_extend_reservation()
1035 my_rsv->rsv_end = next_rsv->rsv_start - 1; in try_to_extend_reservation()
1069 struct ext2_reserve_window_node * my_rsv, in ext2_try_to_allocate_with_rsv() argument
1082 if (my_rsv == NULL) { in ext2_try_to_allocate_with_rsv()
1111 if (rsv_is_empty(&my_rsv->rsv_window) || (ret < 0) || in ext2_try_to_allocate_with_rsv()
1112 !goal_in_my_reservation(&my_rsv->rsv_window, in ext2_try_to_allocate_with_rsv()
1114 if (my_rsv->rsv_goal_size < *count) in ext2_try_to_allocate_with_rsv()
1115 my_rsv->rsv_goal_size = *count; in ext2_try_to_allocate_with_rsv()
1116 ret = alloc_new_reservation(my_rsv, grp_goal, sb, in ext2_try_to_allocate_with_rsv()
1121 if (!goal_in_my_reservation(&my_rsv->rsv_window, in ext2_try_to_allocate_with_rsv()
1125 int curr = my_rsv->rsv_end - in ext2_try_to_allocate_with_rsv()
1129 try_to_extend_reservation(my_rsv, sb, in ext2_try_to_allocate_with_rsv()
1133 if ((my_rsv->rsv_start > group_last_block) || in ext2_try_to_allocate_with_rsv()
1134 (my_rsv->rsv_end < group_first_block)) { in ext2_try_to_allocate_with_rsv()
1139 &num, &my_rsv->rsv_window); in ext2_try_to_allocate_with_rsv()
1141 my_rsv->rsv_alloc_hit += num; in ext2_try_to_allocate_with_rsv()
1222 struct ext2_reserve_window_node *my_rsv = NULL; in ext2_new_blocks() local
1256 my_rsv = &block_i->rsv_window_node; in ext2_new_blocks()
1283 if (my_rsv && (free_blocks < windowsz) in ext2_new_blocks()
1285 && (rsv_is_empty(&my_rsv->rsv_window))) in ext2_new_blocks()
1286 my_rsv = NULL; in ext2_new_blocks()
1303 my_rsv, &num); in ext2_new_blocks()
1335 if (my_rsv && (free_blocks <= (windowsz/2))) in ext2_new_blocks()
1346 bitmap_bh, -1, my_rsv, &num); in ext2_new_blocks()
1357 if (my_rsv) { in ext2_new_blocks()
1358 my_rsv = NULL; in ext2_new_blocks()