H A D | balloc.c | 859 * @my_rsv: reservation window 878 unsigned long *count, struct ext3_reserve_window *my_rsv) ext3_try_to_allocate() 885 if (my_rsv) { ext3_try_to_allocate() 887 if (my_rsv->_rsv_start >= group_first_block) ext3_try_to_allocate() 888 start = my_rsv->_rsv_start - group_first_block; ext3_try_to_allocate() 892 end = my_rsv->_rsv_end - group_first_block + 1; ext3_try_to_allocate() 915 if (!my_rsv) { ext3_try_to_allocate() 969 * @my_rsv: the reservation window 992 struct ext3_reserve_window_node *my_rsv, find_next_reservable_window() 1000 int size = my_rsv->rsv_goal_size; find_next_reservable_window() 1055 if ((prev != my_rsv) && (!rsv_is_empty(&my_rsv->rsv_window))) find_next_reservable_window() 1056 rsv_window_remove(sb, my_rsv); find_next_reservable_window() 1065 my_rsv->rsv_start = cur; find_next_reservable_window() 1066 my_rsv->rsv_end = cur + size - 1; find_next_reservable_window() 1067 my_rsv->rsv_alloc_hit = 0; find_next_reservable_window() 1069 if (prev != my_rsv) find_next_reservable_window() 1070 ext3_rsv_window_add(sb, my_rsv); find_next_reservable_window() 1099 * @my_rsv: the reservation window 1112 static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv, alloc_new_reservation() argument 1133 size = my_rsv->rsv_goal_size; alloc_new_reservation() 1135 if (!rsv_is_empty(&my_rsv->rsv_window)) { alloc_new_reservation() 1150 if ((my_rsv->rsv_start <= group_end_block) && alloc_new_reservation() 1151 (my_rsv->rsv_end > group_end_block) && alloc_new_reservation() 1152 (start_block >= my_rsv->rsv_start)) alloc_new_reservation() 1155 if ((my_rsv->rsv_alloc_hit > alloc_new_reservation() 1156 (my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) { alloc_new_reservation() 1166 my_rsv->rsv_goal_size= size; alloc_new_reservation() 1184 ret = find_next_reservable_window(search_head, my_rsv, sb, alloc_new_reservation() 1188 if (!rsv_is_empty(&my_rsv->rsv_window)) alloc_new_reservation() 1189 rsv_window_remove(sb, my_rsv); alloc_new_reservation() 1207 my_rsv->rsv_start - group_first_block, alloc_new_reservation() 1216 if (!rsv_is_empty(&my_rsv->rsv_window)) alloc_new_reservation() 1217 rsv_window_remove(sb, my_rsv); alloc_new_reservation() 1227 if (start_block >= my_rsv->rsv_start && alloc_new_reservation() 1228 start_block <= my_rsv->rsv_end) { alloc_new_reservation() 1229 trace_ext3_reserved(sb, start_block, my_rsv); alloc_new_reservation() 1238 search_head = my_rsv; alloc_new_reservation() 1245 * @my_rsv: given reservation window 1260 static void try_to_extend_reservation(struct ext3_reserve_window_node *my_rsv, try_to_extend_reservation() argument 1270 next = rb_next(&my_rsv->rsv_node); try_to_extend_reservation() 1273 my_rsv->rsv_end += size; try_to_extend_reservation() 1277 if ((next_rsv->rsv_start - my_rsv->rsv_end - 1) >= size) try_to_extend_reservation() 1278 my_rsv->rsv_end += size; try_to_extend_reservation() 1280 my_rsv->rsv_end = next_rsv->rsv_start - 1; try_to_extend_reservation() 1292 * @my_rsv: reservation window 1318 struct ext3_reserve_window_node * my_rsv, ext3_try_to_allocate_with_rsv() 1346 if (my_rsv == NULL ) { ext3_try_to_allocate_with_rsv() 1376 if (rsv_is_empty(&my_rsv->rsv_window) || (ret < 0) || ext3_try_to_allocate_with_rsv() 1377 !goal_in_my_reservation(&my_rsv->rsv_window, ext3_try_to_allocate_with_rsv() 1379 if (my_rsv->rsv_goal_size < *count) ext3_try_to_allocate_with_rsv() 1380 my_rsv->rsv_goal_size = *count; ext3_try_to_allocate_with_rsv() 1381 ret = alloc_new_reservation(my_rsv, grp_goal, sb, ext3_try_to_allocate_with_rsv() 1386 if (!goal_in_my_reservation(&my_rsv->rsv_window, ext3_try_to_allocate_with_rsv() 1390 int curr = my_rsv->rsv_end - ext3_try_to_allocate_with_rsv() 1394 try_to_extend_reservation(my_rsv, sb, ext3_try_to_allocate_with_rsv() 1398 if ((my_rsv->rsv_start > group_last_block) || ext3_try_to_allocate_with_rsv() 1399 (my_rsv->rsv_end < group_first_block)) { ext3_try_to_allocate_with_rsv() 1404 grp_goal, &num, &my_rsv->rsv_window); ext3_try_to_allocate_with_rsv() 1406 my_rsv->rsv_alloc_hit += num; ext3_try_to_allocate_with_rsv() 1504 struct ext3_reserve_window_node *my_rsv = NULL; ext3_new_blocks() local 1540 my_rsv = &block_i->rsv_window_node; ext3_new_blocks() 1566 if (my_rsv && (free_blocks < windowsz) ext3_new_blocks() 1568 && (rsv_is_empty(&my_rsv->rsv_window))) ext3_new_blocks() 1569 my_rsv = NULL; ext3_new_blocks() 1579 my_rsv, &num, &fatal); ext3_new_blocks() 1612 if (my_rsv && (free_blocks <= (windowsz/2))) ext3_new_blocks() 1623 group_no, bitmap_bh, -1, my_rsv, ext3_new_blocks() 1637 if (my_rsv) { ext3_new_blocks() 1638 my_rsv = NULL; ext3_new_blocks() 876 ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group, struct buffer_head *bitmap_bh, ext3_grpblk_t grp_goal, unsigned long *count, struct ext3_reserve_window *my_rsv) ext3_try_to_allocate() argument 990 find_next_reservable_window( struct ext3_reserve_window_node *search_head, struct ext3_reserve_window_node *my_rsv, struct super_block * sb, ext3_fsblk_t start_block, ext3_fsblk_t last_block) find_next_reservable_window() argument 1315 ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, unsigned int group, struct buffer_head *bitmap_bh, ext3_grpblk_t grp_goal, struct ext3_reserve_window_node * my_rsv, unsigned long *count, int *errp) ext3_try_to_allocate_with_rsv() argument
|