Lines Matching refs:fe_len

921 	for (i = mb_avg_fragment_size_order(ac->ac_sb, ac->ac_g_ex.fe_len);  in ext4_mb_choose_next_group_cr1()
1832 ex->fe_len = 0; in mb_find_extent()
1842 ex->fe_len = 1 << order; in mb_find_extent()
1848 ex->fe_len -= next; in mb_find_extent()
1851 while (needed > ex->fe_len && in mb_find_extent()
1864 ex->fe_len += 1 << order; in mb_find_extent()
1867 if (ex->fe_start + ex->fe_len > EXT4_CLUSTERS_PER_GROUP(e4b->bd_sb)) { in mb_find_extent()
1874 ex->fe_len, ex->fe_logical); in mb_find_extent()
1875 ex->fe_len = 0; in mb_find_extent()
1879 return ex->fe_len; in mb_find_extent()
1889 int len = ex->fe_len; in mb_mark_used()
1977 ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len); in ext4_mb_use_best_found()
2012 if (ac->ac_o_ex.fe_len < ac->ac_b_ex.fe_len) in ext4_mb_use_best_found()
2041 if (bex->fe_len < gex->fe_len) in ext4_mb_check_limits()
2049 max = mb_find_extent(e4b, bex->fe_start, gex->fe_len, &ex); in ext4_mb_check_limits()
2050 if (max >= gex->fe_len) { in ext4_mb_check_limits()
2074 BUG_ON(ex->fe_len <= 0); in ext4_mb_measure_extent()
2075 BUG_ON(ex->fe_len > EXT4_CLUSTERS_PER_GROUP(ac->ac_sb)); in ext4_mb_measure_extent()
2093 if (ex->fe_len == gex->fe_len) { in ext4_mb_measure_extent()
2102 if (bex->fe_len == 0) { in ext4_mb_measure_extent()
2110 if (bex->fe_len < gex->fe_len) { in ext4_mb_measure_extent()
2113 if (ex->fe_len > bex->fe_len) in ext4_mb_measure_extent()
2115 } else if (ex->fe_len > gex->fe_len) { in ext4_mb_measure_extent()
2119 if (ex->fe_len < bex->fe_len) in ext4_mb_measure_extent()
2135 BUG_ON(ex.fe_len <= 0); in ext4_mb_try_best_found()
2141 max = mb_find_extent(e4b, ex.fe_start, ex.fe_len, &ex); in ext4_mb_try_best_found()
2181 ac->ac_g_ex.fe_len, &ex); in ext4_mb_find_by_goal()
2184 if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { in ext4_mb_find_by_goal()
2195 } else if (max >= ac->ac_g_ex.fe_len) { in ext4_mb_find_by_goal()
2196 BUG_ON(ex.fe_len <= 0); in ext4_mb_find_by_goal()
2205 BUG_ON(ex.fe_len <= 0); in ext4_mb_find_by_goal()
2253 ac->ac_b_ex.fe_len = 1 << i; in ext4_mb_simple_scan_group()
2259 BUG_ON(ac->ac_f_ex.fe_len != ac->ac_g_ex.fe_len); in ext4_mb_simple_scan_group()
2307 mb_find_extent(e4b, i, ac->ac_g_ex.fe_len, &ex); in ext4_mb_complex_scan_group()
2308 if (WARN_ON(ex.fe_len <= 0)) in ext4_mb_complex_scan_group()
2310 if (free < ex.fe_len) { in ext4_mb_complex_scan_group()
2314 free, ex.fe_len); in ext4_mb_complex_scan_group()
2327 i += ex.fe_len; in ext4_mb_complex_scan_group()
2328 free -= ex.fe_len; in ext4_mb_complex_scan_group()
2410 if (free < ac->ac_g_ex.fe_len) in ext4_mb_good_group()
2421 if ((free / fragments) >= ac->ac_g_ex.fe_len) in ext4_mb_good_group()
2425 if (free >= ac->ac_g_ex.fe_len) in ext4_mb_good_group()
2467 if (cr <= 2 && free < ac->ac_g_ex.fe_len) in ext4_mb_good_group_nolock()
2626 i = fls(ac->ac_g_ex.fe_len); in ext4_mb_regular_allocator()
2639 if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0) in ext4_mb_regular_allocator()
2732 !(ac->ac_g_ex.fe_len % sbi->s_stripe)) in ext4_mb_regular_allocator()
2748 if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && in ext4_mb_regular_allocator()
2764 ac->ac_b_ex.fe_len, lost); in ext4_mb_regular_allocator()
2768 ac->ac_b_ex.fe_len = 0; in ext4_mb_regular_allocator()
2783 ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, in ext4_mb_regular_allocator()
3753 BUG_ON(ac->ac_b_ex.fe_len <= 0); in ext4_mb_mark_diskspace_used()
3786 len = EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3796 ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3808 for (i = 0; i < ac->ac_b_ex.fe_len; i++) { in ext4_mb_mark_diskspace_used()
3815 ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3823 len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len; in ext4_mb_mark_diskspace_used()
3829 percpu_counter_sub(&sbi->s_freeclusters_counter, ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3841 atomic64_sub(ac->ac_b_ex.fe_len, in ext4_mb_mark_diskspace_used()
3983 ac->ac_g_ex.fe_len = EXT4_SB(sb)->s_mb_group_prealloc; in ext4_mb_normalize_group_request()
3984 mb_debug(sb, "goal %u blocks for locality group\n", ac->ac_g_ex.fe_len); in ext4_mb_normalize_group_request()
4027 size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len); in ext4_mb_normalize_request()
4064 } else if (NRL_CHECK_SIZE(ac->ac_o_ex.fe_len, in ext4_mb_normalize_request()
4072 ac->ac_o_ex.fe_len) << bsbits; in ext4_mb_normalize_request()
4188 ac->ac_g_ex.fe_len = EXT4_NUM_B2C(sbi, size); in ext4_mb_normalize_request()
4214 if (sbi->s_mb_stats && ac->ac_g_ex.fe_len >= 1) { in ext4_mb_collect_stats()
4216 atomic_add(ac->ac_b_ex.fe_len, &sbi->s_bal_allocated); in ext4_mb_collect_stats()
4217 if (ac->ac_b_ex.fe_len >= ac->ac_o_ex.fe_len) in ext4_mb_collect_stats()
4247 if (ac->ac_f_ex.fe_len == 0) in ext4_discard_allocated_blocks()
4261 ac->ac_f_ex.fe_len); in ext4_discard_allocated_blocks()
4267 pa->pa_free += ac->ac_b_ex.fe_len; in ext4_discard_allocated_blocks()
4284 start + EXT4_C2B(sbi, ac->ac_o_ex.fe_len)); in ext4_mb_use_inode_pa()
4288 ac->ac_b_ex.fe_len = len; in ext4_mb_use_inode_pa()
4306 unsigned int len = ac->ac_o_ex.fe_len; in ext4_mb_use_group_pa()
4311 ac->ac_b_ex.fe_len = len; in ext4_mb_use_group_pa()
4410 order = fls(ac->ac_o_ex.fe_len) - 1; in ext4_mb_use_preallocated()
4426 pa->pa_free >= ac->ac_o_ex.fe_len) { in ext4_mb_use_preallocated()
4611 BUG_ON(ac->ac_o_ex.fe_len >= ac->ac_b_ex.fe_len); in ext4_mb_new_inode_pa()
4618 if (ac->ac_b_ex.fe_len < ac->ac_g_ex.fe_len) { in ext4_mb_new_inode_pa()
4628 BUG_ON(ac->ac_g_ex.fe_len < ac->ac_o_ex.fe_len); in ext4_mb_new_inode_pa()
4636 wins = EXT4_C2B(sbi, ac->ac_b_ex.fe_len - ac->ac_o_ex.fe_len); in ext4_mb_new_inode_pa()
4642 EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_new_inode_pa()
4649 BUG_ON(ac->ac_o_ex.fe_len > ac->ac_b_ex.fe_len); in ext4_mb_new_inode_pa()
4658 pa->pa_len = ac->ac_b_ex.fe_len; in ext4_mb_new_inode_pa()
4699 BUG_ON(ac->ac_o_ex.fe_len >= ac->ac_b_ex.fe_len); in ext4_mb_new_group_pa()
4712 pa->pa_len = ac->ac_b_ex.fe_len; in ext4_mb_new_group_pa()
5122 (unsigned long)ac->ac_o_ex.fe_len, in ext4_mb_show_ac()
5126 (unsigned long)ac->ac_g_ex.fe_len, in ext4_mb_show_ac()
5130 (unsigned long)ac->ac_b_ex.fe_len, in ext4_mb_show_ac()
5170 size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len); in ext4_mb_group_or_file()
5241 ac->ac_o_ex.fe_len = len; in ext4_mb_initialize_context()
5424 pa->pa_pstart += EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_release_context()
5425 pa->pa_lstart += EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_release_context()
5426 pa->pa_free -= ac->ac_b_ex.fe_len; in ext4_mb_release_context()
5427 pa->pa_len -= ac->ac_b_ex.fe_len; in ext4_mb_release_context()
5501 freed = ext4_mb_discard_preallocations(sb, ac->ac_o_ex.fe_len); in ext4_mb_discard_preallocations_should_retry()
5625 ac->ac_o_ex.fe_len >= ac->ac_f_ex.fe_len) in ext4_mb_new_blocks()
5635 ar->len = ac->ac_b_ex.fe_len; in ext4_mb_new_blocks()
5651 ac->ac_b_ex.fe_len = 0; in ext4_mb_new_blocks()
6346 ex.fe_len = count; in ext4_trim_extent()
6356 mb_free_blocks(NULL, e4b, start, ex.fe_len); in ext4_trim_extent()