Searched refs:my_rsv (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/fs/ext2/
H A Dballoc.c648 * @my_rsv: reservation window
667 struct ext2_reserve_window *my_rsv) ext2_try_to_allocate()
674 if (my_rsv) { ext2_try_to_allocate()
676 if (my_rsv->_rsv_start >= group_first_block) ext2_try_to_allocate()
677 start = my_rsv->_rsv_start - group_first_block; ext2_try_to_allocate()
681 end = my_rsv->_rsv_end - group_first_block + 1; ext2_try_to_allocate()
704 if (!my_rsv) { ext2_try_to_allocate()
778 struct ext2_reserve_window_node *my_rsv, find_next_reservable_window()
786 int size = my_rsv->rsv_goal_size; find_next_reservable_window()
841 if ((prev != my_rsv) && (!rsv_is_empty(&my_rsv->rsv_window))) find_next_reservable_window()
842 rsv_window_remove(sb, my_rsv); find_next_reservable_window()
851 my_rsv->rsv_start = cur; find_next_reservable_window()
852 my_rsv->rsv_end = cur + size - 1; find_next_reservable_window()
853 my_rsv->rsv_alloc_hit = 0; find_next_reservable_window()
855 if (prev != my_rsv) find_next_reservable_window()
856 ext2_rsv_window_add(sb, my_rsv); find_next_reservable_window()
898 static int alloc_new_reservation(struct ext2_reserve_window_node *my_rsv, alloc_new_reservation() argument
918 size = my_rsv->rsv_goal_size; alloc_new_reservation()
920 if (!rsv_is_empty(&my_rsv->rsv_window)) { alloc_new_reservation()
935 if ((my_rsv->rsv_start <= group_end_block) && alloc_new_reservation()
936 (my_rsv->rsv_end > group_end_block) && alloc_new_reservation()
937 (start_block >= my_rsv->rsv_start)) alloc_new_reservation()
940 if ((my_rsv->rsv_alloc_hit > alloc_new_reservation()
941 (my_rsv->rsv_end - my_rsv->rsv_start + 1) / 2)) { alloc_new_reservation()
951 my_rsv->rsv_goal_size= size; alloc_new_reservation()
969 ret = find_next_reservable_window(search_head, my_rsv, sb, alloc_new_reservation()
973 if (!rsv_is_empty(&my_rsv->rsv_window)) alloc_new_reservation()
974 rsv_window_remove(sb, my_rsv); alloc_new_reservation()
990 my_rsv->rsv_start - group_first_block, alloc_new_reservation()
999 if (!rsv_is_empty(&my_rsv->rsv_window)) alloc_new_reservation()
1000 rsv_window_remove(sb, my_rsv); alloc_new_reservation()
1010 if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end) alloc_new_reservation()
1018 search_head = my_rsv; alloc_new_reservation()
1025 * @my_rsv: given reservation window
1040 static void try_to_extend_reservation(struct ext2_reserve_window_node *my_rsv, try_to_extend_reservation() argument
1050 next = rb_next(&my_rsv->rsv_node); try_to_extend_reservation()
1053 my_rsv->rsv_end += size; try_to_extend_reservation()
1057 if ((next_rsv->rsv_start - my_rsv->rsv_end - 1) >= size) try_to_extend_reservation()
1058 my_rsv->rsv_end += size; try_to_extend_reservation()
1060 my_rsv->rsv_end = next_rsv->rsv_start - 1; try_to_extend_reservation()
1072 * @my_rsv: reservation window
1094 struct ext2_reserve_window_node * my_rsv, ext2_try_to_allocate_with_rsv()
1107 if (my_rsv == NULL) { ext2_try_to_allocate_with_rsv()
1136 if (rsv_is_empty(&my_rsv->rsv_window) || (ret < 0) || ext2_try_to_allocate_with_rsv()
1137 !goal_in_my_reservation(&my_rsv->rsv_window, ext2_try_to_allocate_with_rsv()
1139 if (my_rsv->rsv_goal_size < *count) ext2_try_to_allocate_with_rsv()
1140 my_rsv->rsv_goal_size = *count; ext2_try_to_allocate_with_rsv()
1141 ret = alloc_new_reservation(my_rsv, grp_goal, sb, ext2_try_to_allocate_with_rsv()
1146 if (!goal_in_my_reservation(&my_rsv->rsv_window, ext2_try_to_allocate_with_rsv()
1150 int curr = my_rsv->rsv_end - ext2_try_to_allocate_with_rsv()
1154 try_to_extend_reservation(my_rsv, sb, ext2_try_to_allocate_with_rsv()
1158 if ((my_rsv->rsv_start > group_last_block) || ext2_try_to_allocate_with_rsv()
1159 (my_rsv->rsv_end < group_first_block)) { ext2_try_to_allocate_with_rsv()
1164 &num, &my_rsv->rsv_window); ext2_try_to_allocate_with_rsv()
1166 my_rsv->rsv_alloc_hit += num; ext2_try_to_allocate_with_rsv()
1227 struct ext2_reserve_window_node *my_rsv = NULL; ext2_new_blocks() local
1261 my_rsv = &block_i->rsv_window_node; ext2_new_blocks()
1288 if (my_rsv && (free_blocks < windowsz) ext2_new_blocks()
1290 && (rsv_is_empty(&my_rsv->rsv_window))) ext2_new_blocks()
1291 my_rsv = NULL; ext2_new_blocks()
1301 my_rsv, &num); ext2_new_blocks()
1333 if (my_rsv && (free_blocks <= (windowsz/2))) ext2_new_blocks()
1344 bitmap_bh, -1, my_rsv, &num); ext2_new_blocks()
1355 if (my_rsv) { ext2_new_blocks()
1356 my_rsv = NULL; ext2_new_blocks()
664 ext2_try_to_allocate(struct super_block *sb, int group, struct buffer_head *bitmap_bh, ext2_grpblk_t grp_goal, unsigned long *count, struct ext2_reserve_window *my_rsv) ext2_try_to_allocate() argument
776 find_next_reservable_window( struct ext2_reserve_window_node *search_head, struct ext2_reserve_window_node *my_rsv, struct super_block * sb, ext2_fsblk_t start_block, ext2_fsblk_t last_block) find_next_reservable_window() argument
1092 ext2_try_to_allocate_with_rsv(struct super_block *sb, unsigned int group, struct buffer_head *bitmap_bh, ext2_grpblk_t grp_goal, struct ext2_reserve_window_node * my_rsv, unsigned long *count) ext2_try_to_allocate_with_rsv() argument
/linux-4.1.27/fs/ext3/
H A Dballoc.c859 * @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

Completed in 89 milliseconds