• Home
  • Raw
  • Download

Lines Matching refs:group

404 					ext4_group_t group);
406 ext4_group_t group);
410 ext4_group_t group, int cr);
602 struct ext4_group_info *grp, ext4_group_t group) in mb_group_bb_bitmap_alloc() argument
610 bh = ext4_read_block_bitmap(sb, group); in mb_group_bb_bitmap_alloc()
643 struct ext4_group_info *grp, ext4_group_t group) in mb_group_bb_bitmap_alloc() argument
877 int *new_cr, ext4_group_t *group, ext4_group_t ngroups) in ext4_mb_choose_next_group_cr0() argument
917 *group = grp->bb_group; in ext4_mb_choose_next_group_cr0()
918 ac->ac_last_optimal_group = *group; in ext4_mb_choose_next_group_cr0()
930 int *new_cr, ext4_group_t *group, ext4_group_t ngroups) in ext4_mb_choose_next_group_cr1() argument
990 *group = grp->bb_group; in ext4_mb_choose_next_group_cr1()
997 ac->ac_last_optimal_group = *group; in ext4_mb_choose_next_group_cr1()
1016 next_linear_group(struct ext4_allocation_context *ac, ext4_group_t group, in next_linear_group() argument
1032 return group; in next_linear_group()
1038 return group + 1 >= ngroups ? 0 : group + 1; in next_linear_group()
1055 int *new_cr, ext4_group_t *group, ext4_group_t ngroups) in ext4_mb_choose_next_group() argument
1060 *group = next_linear_group(ac, *group, ngroups); in ext4_mb_choose_next_group()
1065 ext4_mb_choose_next_group_cr0(ac, new_cr, group, ngroups); in ext4_mb_choose_next_group()
1067 ext4_mb_choose_next_group_cr1(ac, new_cr, group, ngroups); in ext4_mb_choose_next_group()
1117 void *buddy, void *bitmap, ext4_group_t group, in ext4_mb_generate_buddy() argument
1149 ext4_grp_locked_error(sb, group, 0, 0, in ext4_mb_generate_buddy()
1158 ext4_mark_group_bitmap_corrupted(sb, group, in ext4_mb_generate_buddy()
1217 ext4_group_t first_group, group; in ext4_mb_init_cache() local
1253 for (i = 0, group = first_group; i < groups_per_page; i++, group++) { in ext4_mb_init_cache()
1254 if (group >= ngroups) in ext4_mb_init_cache()
1257 grinfo = ext4_get_group_info(sb, group); in ext4_mb_init_cache()
1270 bh[i] = ext4_read_block_bitmap_nowait(sb, group, false); in ext4_mb_init_cache()
1276 mb_debug(sb, "read bitmap for group %u\n", group); in ext4_mb_init_cache()
1280 for (i = 0, group = first_group; i < groups_per_page; i++, group++) { in ext4_mb_init_cache()
1285 err2 = ext4_wait_block_bitmap(sb, group, bh[i]); in ext4_mb_init_cache()
1292 group = (first_block + i) >> 1; in ext4_mb_init_cache()
1293 if (group >= ngroups) in ext4_mb_init_cache()
1296 if (!bh[group - first_group]) in ext4_mb_init_cache()
1300 if (!buffer_verified(bh[group - first_group])) in ext4_mb_init_cache()
1312 bitmap = bh[group - first_group]->b_data; in ext4_mb_init_cache()
1322 group, page->index, i * blocksize); in ext4_mb_init_cache()
1323 trace_ext4_mb_buddy_bitmap_load(sb, group); in ext4_mb_init_cache()
1324 grinfo = ext4_get_group_info(sb, group); in ext4_mb_init_cache()
1336 ext4_lock_group(sb, group); in ext4_mb_init_cache()
1339 ext4_mb_generate_buddy(sb, data, incore, group, grinfo); in ext4_mb_init_cache()
1340 ext4_unlock_group(sb, group); in ext4_mb_init_cache()
1346 group, page->index, i * blocksize); in ext4_mb_init_cache()
1347 trace_ext4_mb_bitmap_load(sb, group); in ext4_mb_init_cache()
1350 ext4_lock_group(sb, group); in ext4_mb_init_cache()
1354 ext4_mb_generate_from_pa(sb, data, group); in ext4_mb_init_cache()
1355 ext4_mb_generate_from_freelist(sb, data, group); in ext4_mb_init_cache()
1356 ext4_unlock_group(sb, group); in ext4_mb_init_cache()
1383 ext4_group_t group, struct ext4_buddy *e4b, gfp_t gfp) in ext4_mb_get_buddy_page_lock() argument
1399 block = group * 2; in ext4_mb_get_buddy_page_lock()
1442 int ext4_mb_init_group(struct super_block *sb, ext4_group_t group, gfp_t gfp) in ext4_mb_init_group() argument
1451 mb_debug(sb, "init group %u\n", group); in ext4_mb_init_group()
1452 this_grp = ext4_get_group_info(sb, group); in ext4_mb_init_group()
1465 ret = ext4_mb_get_buddy_page_lock(sb, group, &e4b, gfp); in ext4_mb_init_group()
1512 ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group, in ext4_mb_load_buddy_gfp() argument
1526 mb_debug(sb, "load group %u\n", group); in ext4_mb_load_buddy_gfp()
1529 grp = ext4_get_group_info(sb, group); in ext4_mb_load_buddy_gfp()
1536 e4b->bd_group = group; in ext4_mb_load_buddy_gfp()
1545 ret = ext4_mb_init_group(sb, group, gfp); in ext4_mb_load_buddy_gfp()
1555 block = group * 2; in ext4_mb_load_buddy_gfp()
1650 static int ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group, in ext4_mb_load_buddy() argument
1653 return ext4_mb_load_buddy_gfp(sb, group, e4b, GFP_NOFS); in ext4_mb_load_buddy()
2213 ext4_group_t group = ex.fe_group; in ext4_mb_try_best_found() local
2218 err = ext4_mb_load_buddy(ac->ac_sb, group, e4b); in ext4_mb_try_best_found()
2222 ext4_lock_group(ac->ac_sb, group); in ext4_mb_try_best_found()
2234 ext4_unlock_group(ac->ac_sb, group); in ext4_mb_try_best_found()
2244 ext4_group_t group = ac->ac_g_ex.fe_group; in ext4_mb_find_by_goal() local
2248 struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); in ext4_mb_find_by_goal()
2258 err = ext4_mb_load_buddy(ac->ac_sb, group, e4b); in ext4_mb_find_by_goal()
2262 ext4_lock_group(ac->ac_sb, group); in ext4_mb_find_by_goal()
2299 ext4_unlock_group(ac->ac_sb, group); in ext4_mb_find_by_goal()
2468 ext4_group_t group, int cr) in ext4_mb_good_group() argument
2472 struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); in ext4_mb_good_group()
2494 ((group % flex_size) == 0)) in ext4_mb_good_group()
2536 ext4_group_t group, int cr) in ext4_mb_good_group_nolock() argument
2538 struct ext4_group_info *grp = ext4_get_group_info(ac->ac_sb, group); in ext4_mb_good_group_nolock()
2550 ext4_lock_group(sb, group); in ext4_mb_good_group_nolock()
2551 __release(ext4_group_lock_ptr(sb, group)); in ext4_mb_good_group_nolock()
2561 __acquire(ext4_group_lock_ptr(sb, group)); in ext4_mb_good_group_nolock()
2562 ext4_unlock_group(sb, group); in ext4_mb_good_group_nolock()
2568 ext4_get_group_desc(sb, group, NULL); in ext4_mb_good_group_nolock()
2581 ((group & ((1 << sbi->s_log_groups_per_flex) - 1)) != 0)) && in ext4_mb_good_group_nolock()
2585 ret = ext4_mb_init_group(sb, group, GFP_NOFS); in ext4_mb_good_group_nolock()
2591 ext4_lock_group(sb, group); in ext4_mb_good_group_nolock()
2592 __release(ext4_group_lock_ptr(sb, group)); in ext4_mb_good_group_nolock()
2594 ret = ext4_mb_good_group(ac, group, cr); in ext4_mb_good_group_nolock()
2597 __acquire(ext4_group_lock_ptr(sb, group)); in ext4_mb_good_group_nolock()
2598 ext4_unlock_group(sb, group); in ext4_mb_good_group_nolock()
2607 ext4_group_t ext4_mb_prefetch(struct super_block *sb, ext4_group_t group, in ext4_mb_prefetch() argument
2616 struct ext4_group_desc *gdp = ext4_get_group_desc(sb, group, in ext4_mb_prefetch()
2618 struct ext4_group_info *grp = ext4_get_group_info(sb, group); in ext4_mb_prefetch()
2632 bh = ext4_read_block_bitmap_nowait(sb, group, true); in ext4_mb_prefetch()
2639 if (++group >= ngroups) in ext4_mb_prefetch()
2640 group = 0; in ext4_mb_prefetch()
2643 return group; in ext4_mb_prefetch()
2658 void ext4_mb_prefetch_fini(struct super_block *sb, ext4_group_t group, in ext4_mb_prefetch_fini() argument
2662 struct ext4_group_desc *gdp = ext4_get_group_desc(sb, group, in ext4_mb_prefetch_fini()
2664 struct ext4_group_info *grp = ext4_get_group_info(sb, group); in ext4_mb_prefetch_fini()
2666 if (!group) in ext4_mb_prefetch_fini()
2667 group = ext4_get_groups_count(sb); in ext4_mb_prefetch_fini()
2668 group--; in ext4_mb_prefetch_fini()
2669 grp = ext4_get_group_info(sb, group); in ext4_mb_prefetch_fini()
2675 if (ext4_mb_init_group(sb, group, GFP_NOFS)) in ext4_mb_prefetch_fini()
2684 ext4_group_t prefetch_grp = 0, ngroups, group, i; in ext4_mb_regular_allocator() local
2755 group = ac->ac_g_ex.fe_group; in ext4_mb_regular_allocator()
2756 ac->ac_last_optimal_group = group; in ext4_mb_regular_allocator()
2758 prefetch_grp = group; in ext4_mb_regular_allocator()
2761 ext4_mb_choose_next_group(ac, &new_cr, &group, ngroups)) { in ext4_mb_regular_allocator()
2776 if ((prefetch_grp == group) && in ext4_mb_regular_allocator()
2784 nr -= group & (nr - 1); in ext4_mb_regular_allocator()
2787 prefetch_grp = ext4_mb_prefetch(sb, group, in ext4_mb_regular_allocator()
2794 ret = ext4_mb_good_group_nolock(ac, group, cr); in ext4_mb_regular_allocator()
2801 err = ext4_mb_load_buddy(sb, group, &e4b); in ext4_mb_regular_allocator()
2805 ext4_lock_group(sb, group); in ext4_mb_regular_allocator()
2811 ret = ext4_mb_good_group(ac, group, cr); in ext4_mb_regular_allocator()
2813 ext4_unlock_group(sb, group); in ext4_mb_regular_allocator()
2827 ext4_unlock_group(sb, group); in ext4_mb_regular_allocator()
2885 ext4_group_t group; in ext4_mb_seq_groups_start() local
2889 group = *pos + 1; in ext4_mb_seq_groups_start()
2890 return (void *) ((unsigned long) group); in ext4_mb_seq_groups_start()
2896 ext4_group_t group; in ext4_mb_seq_groups_next() local
2901 group = *pos + 1; in ext4_mb_seq_groups_next()
2902 return (void *) ((unsigned long) group); in ext4_mb_seq_groups_next()
2908 ext4_group_t group = (ext4_group_t) ((unsigned long) v); in ext4_mb_seq_groups_show() local
2921 group--; in ext4_mb_seq_groups_show()
2922 if (group == 0) in ext4_mb_seq_groups_show()
2930 grinfo = ext4_get_group_info(sb, group); in ext4_mb_seq_groups_show()
2935 err = ext4_mb_load_buddy(sb, group, &e4b); in ext4_mb_seq_groups_show()
2937 seq_printf(seq, "#%-5u: I/O error\n", group); in ext4_mb_seq_groups_show()
2948 seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free, in ext4_mb_seq_groups_show()
3168 int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group, in ext4_mb_add_groupinfo() argument
3173 int idx = group >> EXT4_DESC_PER_BLOCK_BITS(sb); in ext4_mb_add_groupinfo()
3183 if (group % EXT4_DESC_PER_BLOCK(sb) == 0) { in ext4_mb_add_groupinfo()
3198 i = group & (EXT4_DESC_PER_BLOCK(sb) - 1); in ext4_mb_add_groupinfo()
3215 ext4_free_clusters_after_init(sb, group, desc); in ext4_mb_add_groupinfo()
3227 meta_group_info[i]->bb_group = group; in ext4_mb_add_groupinfo()
3229 mb_group_bb_bitmap_alloc(sb, meta_group_info[i], group); in ext4_mb_add_groupinfo()
3234 if (group % EXT4_DESC_PER_BLOCK(sb) == 0) { in ext4_mb_add_groupinfo()
3955 ext4_group_t group; in ext4_mb_mark_bb() local
3962 ext4_get_group_no_and_offset(sb, block, &group, &blkoff); in ext4_mb_mark_bb()
3976 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_mark_bb()
3984 gdp = ext4_get_group_desc(sb, group, &gdp_bh); in ext4_mb_mark_bb()
3988 ext4_lock_group(sb, group); in ext4_mb_mark_bb()
4004 ext4_free_clusters_after_init(sb, group, gdp)); in ext4_mb_mark_bb()
4012 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_mb_mark_bb()
4013 ext4_group_desc_csum_set(sb, group, gdp); in ext4_mb_mark_bb()
4015 ext4_unlock_group(sb, group); in ext4_mb_mark_bb()
4018 ext4_group_t flex_group = ext4_flex_group(sbi, group); in ext4_mb_mark_bb()
4520 ext4_group_t group) in ext4_mb_generate_from_freelist() argument
4526 grp = ext4_get_group_info(sb, group); in ext4_mb_generate_from_freelist()
4546 ext4_group_t group) in ext4_mb_generate_from_pa() argument
4548 struct ext4_group_info *grp = ext4_get_group_info(sb, group); in ext4_mb_generate_from_pa()
4576 BUG_ON(groupnr != group); in ext4_mb_generate_from_pa()
4580 mb_debug(sb, "preallocated %d for group %u\n", preallocated, group); in ext4_mb_generate_from_pa()
4854 ext4_group_t group; in ext4_mb_release_inode_pa() local
4860 ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); in ext4_mb_release_inode_pa()
4862 BUG_ON(group != e4b->bd_group && pa->pa_len != 0); in ext4_mb_release_inode_pa()
4871 (unsigned) ext4_group_first_block_no(sb, group) + bit, in ext4_mb_release_inode_pa()
4872 (unsigned) next - bit, (unsigned) group); in ext4_mb_release_inode_pa()
4875 trace_ext4_mballoc_discard(sb, NULL, group, bit, next - bit); in ext4_mb_release_inode_pa()
4888 ext4_grp_locked_error(sb, group, 0, 0, "free %u, pa_free %u", in ext4_mb_release_inode_pa()
4905 ext4_group_t group; in ext4_mb_release_group_pa() local
4910 ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); in ext4_mb_release_group_pa()
4911 if (unlikely(group != e4b->bd_group && pa->pa_len != 0)) { in ext4_mb_release_group_pa()
4913 e4b->bd_group, group, pa->pa_pstart); in ext4_mb_release_group_pa()
4918 trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len); in ext4_mb_release_group_pa()
4934 ext4_group_t group, int *busy) in ext4_mb_discard_group_preallocations() argument
4936 struct ext4_group_info *grp = ext4_get_group_info(sb, group); in ext4_mb_discard_group_preallocations()
4946 mb_debug(sb, "discard preallocation for group %u\n", group); in ext4_mb_discard_group_preallocations()
4950 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_discard_group_preallocations()
4955 err, group); in ext4_mb_discard_group_preallocations()
4959 err = ext4_mb_load_buddy(sb, group, &e4b); in ext4_mb_discard_group_preallocations()
4962 err, group); in ext4_mb_discard_group_preallocations()
4968 ext4_lock_group(sb, group); in ext4_mb_discard_group_preallocations()
5014 ext4_unlock_group(sb, group); in ext4_mb_discard_group_preallocations()
5019 free, group, grp->bb_free); in ext4_mb_discard_group_preallocations()
5038 ext4_group_t group = 0; in ext4_discard_preallocations() local
5113 group = ext4_get_group_number(sb, pa->pa_pstart); in ext4_discard_preallocations()
5115 err = ext4_mb_load_buddy_gfp(sb, group, &e4b, in ext4_discard_preallocations()
5119 err, group); in ext4_discard_preallocations()
5123 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_discard_preallocations()
5127 err, group); in ext4_discard_preallocations()
5132 ext4_lock_group(sb, group); in ext4_discard_preallocations()
5135 ext4_unlock_group(sb, group); in ext4_discard_preallocations()
5311 ext4_group_t group; in ext4_mb_initialize_context() local
5328 ext4_get_group_no_and_offset(sb, goal, &group, &block); in ext4_mb_initialize_context()
5336 ac->ac_o_ex.fe_group = group; in ext4_mb_initialize_context()
5362 ext4_group_t group = 0; in ext4_mb_discard_lg_preallocations() local
5415 group = ext4_get_group_number(sb, pa->pa_pstart); in ext4_mb_discard_lg_preallocations()
5416 err = ext4_mb_load_buddy_gfp(sb, group, &e4b, in ext4_mb_discard_lg_preallocations()
5420 err, group); in ext4_mb_discard_lg_preallocations()
5423 ext4_lock_group(sb, group); in ext4_mb_discard_lg_preallocations()
5426 ext4_unlock_group(sb, group); in ext4_mb_discard_lg_preallocations()
5803 ext4_group_t group = e4b->bd_group; in ext4_mb_free_metadata() local
5837 ext4_grp_locked_error(sb, group, 0, in ext4_mb_free_metadata()
5838 ext4_group_first_block_no(sb, group) + in ext4_mb_free_metadata()
5881 ext4_group_t group; in ext4_mb_new_blocks_simple() local
5894 ext4_get_group_no_and_offset(sb, goal, &group, &blkoff); in ext4_mb_new_blocks_simple()
5895 for (; group < ext4_get_groups_count(sb); group++) { in ext4_mb_new_blocks_simple()
5896 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_mb_new_blocks_simple()
5904 max(ext4_group_first_block_no(sb, group), goal), in ext4_mb_new_blocks_simple()
5912 ext4_group_first_block_no(sb, group) + i)) { in ext4_mb_new_blocks_simple()
5922 if (group >= ext4_get_groups_count(sb) || i >= max) { in ext4_mb_new_blocks_simple()
5927 block = ext4_group_first_block_no(sb, group) + i; in ext4_mb_new_blocks_simple()
5941 ext4_group_t group; in ext4_free_blocks_simple() local
5945 ext4_get_group_no_and_offset(sb, block, &group, &blkoff); in ext4_free_blocks_simple()
5946 bitmap_bh = ext4_read_block_bitmap(sb, group); in ext4_free_blocks_simple()
5952 gdp = ext4_get_group_desc(sb, group, &gdp_bh); in ext4_free_blocks_simple()
5967 ext4_block_bitmap_csum_set(sb, group, gdp, bitmap_bh); in ext4_free_blocks_simple()
5968 ext4_group_desc_csum_set(sb, group, gdp); in ext4_free_blocks_simple()
6437 ext4_group_t group = e4b->bd_group; in ext4_trim_extent() local
6440 trace_ext4_trim_extent(sb, group, start, count); in ext4_trim_extent()
6442 assert_spin_locked(ext4_group_lock_ptr(sb, group)); in ext4_trim_extent()
6445 ex.fe_group = group; in ext4_trim_extent()
6453 ext4_unlock_group(sb, group); in ext4_trim_extent()
6454 ret = ext4_issue_discard(sb, group, start, count, NULL); in ext4_trim_extent()
6455 ext4_lock_group(sb, group); in ext4_trim_extent()
6551 ext4_trim_all_free(struct super_block *sb, ext4_group_t group, in ext4_trim_all_free() argument
6558 trace_ext4_trim_all_free(sb, group, start, max); in ext4_trim_all_free()
6560 ret = ext4_mb_load_buddy(sb, group, &e4b); in ext4_trim_all_free()
6563 ret, group); in ext4_trim_all_free()
6567 ext4_lock_group(sb, group); in ext4_trim_all_free()
6575 ext4_unlock_group(sb, group); in ext4_trim_all_free()
6579 ret, group); in ext4_trim_all_free()
6600 ext4_group_t group, first_group, last_group; in ext4_trim_fs() local
6640 for (group = first_group; group <= last_group; group++) { in ext4_trim_fs()
6643 grp = ext4_get_group_info(sb, group); in ext4_trim_fs()
6648 ret = ext4_mb_init_group(sb, group, GFP_NOFS); in ext4_trim_fs()
6659 if (group == last_group) in ext4_trim_fs()
6662 cnt = ext4_trim_all_free(sb, group, first_cluster, in ext4_trim_fs()
6690 ext4_group_t group, in ext4_mballoc_query_range() argument
6701 error = ext4_mb_load_buddy(sb, group, &e4b); in ext4_mballoc_query_range()
6706 ext4_lock_group(sb, group); in ext4_mballoc_query_range()
6718 ext4_unlock_group(sb, group); in ext4_mballoc_query_range()
6719 error = formatter(sb, group, start, next - start, priv); in ext4_mballoc_query_range()
6722 ext4_lock_group(sb, group); in ext4_mballoc_query_range()
6727 ext4_unlock_group(sb, group); in ext4_mballoc_query_range()