Lines Matching refs:fe_len

1562 		ex->fe_len = 0;  in mb_find_extent()
1572 ex->fe_len = 1 << order; in mb_find_extent()
1578 ex->fe_len -= next; in mb_find_extent()
1581 while (needed > ex->fe_len && in mb_find_extent()
1594 ex->fe_len += 1 << order; in mb_find_extent()
1597 if (ex->fe_start + ex->fe_len > EXT4_CLUSTERS_PER_GROUP(e4b->bd_sb)) { in mb_find_extent()
1603 ex->fe_len, ex->fe_logical); in mb_find_extent()
1604 ex->fe_len = 0; in mb_find_extent()
1608 return ex->fe_len; in mb_find_extent()
1618 int len = ex->fe_len; in mb_mark_used()
1699 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()
1734 if (ac->ac_o_ex.fe_len < ac->ac_b_ex.fe_len) in ext4_mb_use_best_found()
1763 if (bex->fe_len < gex->fe_len) in ext4_mb_check_limits()
1771 max = mb_find_extent(e4b, bex->fe_start, gex->fe_len, &ex); in ext4_mb_check_limits()
1772 if (max >= gex->fe_len) { in ext4_mb_check_limits()
1796 BUG_ON(ex->fe_len <= 0); in ext4_mb_measure_extent()
1797 BUG_ON(ex->fe_len > EXT4_CLUSTERS_PER_GROUP(ac->ac_sb)); in ext4_mb_measure_extent()
1815 if (ex->fe_len == gex->fe_len) { in ext4_mb_measure_extent()
1824 if (bex->fe_len == 0) { in ext4_mb_measure_extent()
1832 if (bex->fe_len < gex->fe_len) { in ext4_mb_measure_extent()
1835 if (ex->fe_len > bex->fe_len) in ext4_mb_measure_extent()
1837 } else if (ex->fe_len > gex->fe_len) { in ext4_mb_measure_extent()
1841 if (ex->fe_len < bex->fe_len) in ext4_mb_measure_extent()
1857 BUG_ON(ex.fe_len <= 0); in ext4_mb_try_best_found()
1863 max = mb_find_extent(e4b, ex.fe_start, ex.fe_len, &ex); in ext4_mb_try_best_found()
1903 ac->ac_g_ex.fe_len, &ex); in ext4_mb_find_by_goal()
1906 if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { in ext4_mb_find_by_goal()
1917 } else if (max >= ac->ac_g_ex.fe_len) { in ext4_mb_find_by_goal()
1918 BUG_ON(ex.fe_len <= 0); in ext4_mb_find_by_goal()
1927 BUG_ON(ex.fe_len <= 0); in ext4_mb_find_by_goal()
1975 ac->ac_b_ex.fe_len = 1 << i; in ext4_mb_simple_scan_group()
1981 BUG_ON(ac->ac_f_ex.fe_len != ac->ac_g_ex.fe_len); in ext4_mb_simple_scan_group()
2029 mb_find_extent(e4b, i, ac->ac_g_ex.fe_len, &ex); in ext4_mb_complex_scan_group()
2030 if (WARN_ON(ex.fe_len <= 0)) in ext4_mb_complex_scan_group()
2032 if (free < ex.fe_len) { in ext4_mb_complex_scan_group()
2036 free, ex.fe_len); in ext4_mb_complex_scan_group()
2049 i += ex.fe_len; in ext4_mb_complex_scan_group()
2050 free -= ex.fe_len; in ext4_mb_complex_scan_group()
2132 if (free < ac->ac_g_ex.fe_len) in ext4_mb_good_group()
2143 if ((free / fragments) >= ac->ac_g_ex.fe_len) in ext4_mb_good_group()
2147 if (free >= ac->ac_g_ex.fe_len) in ext4_mb_good_group()
2179 if (cr <= 2 && free < ac->ac_g_ex.fe_len) in ext4_mb_good_group_nolock()
2332 i = fls(ac->ac_g_ex.fe_len); in ext4_mb_regular_allocator()
2345 if ((ac->ac_g_ex.fe_len & (~(1 << (i - 1)))) == 0) in ext4_mb_regular_allocator()
2437 !(ac->ac_g_ex.fe_len % sbi->s_stripe)) in ext4_mb_regular_allocator()
2450 if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && in ext4_mb_regular_allocator()
2466 ac->ac_b_ex.fe_len, lost); in ext4_mb_regular_allocator()
2470 ac->ac_b_ex.fe_len = 0; in ext4_mb_regular_allocator()
2482 ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, in ext4_mb_regular_allocator()
3199 BUG_ON(ac->ac_b_ex.fe_len <= 0); in ext4_mb_mark_diskspace_used()
3231 len = EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3241 ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3253 for (i = 0; i < ac->ac_b_ex.fe_len; i++) { in ext4_mb_mark_diskspace_used()
3260 ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3268 len = ext4_free_group_clusters(sb, gdp) - ac->ac_b_ex.fe_len; in ext4_mb_mark_diskspace_used()
3274 percpu_counter_sub(&sbi->s_freeclusters_counter, ac->ac_b_ex.fe_len); in ext4_mb_mark_diskspace_used()
3286 atomic64_sub(ac->ac_b_ex.fe_len, in ext4_mb_mark_diskspace_used()
3394 ac->ac_g_ex.fe_len = EXT4_SB(sb)->s_mb_group_prealloc; in ext4_mb_normalize_group_request()
3395 mb_debug(sb, "goal %u blocks for locality group\n", ac->ac_g_ex.fe_len); in ext4_mb_normalize_group_request()
3438 size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len); in ext4_mb_normalize_request()
3475 } else if (NRL_CHECK_SIZE(ac->ac_o_ex.fe_len, in ext4_mb_normalize_request()
3483 ac->ac_o_ex.fe_len) << bsbits; in ext4_mb_normalize_request()
3575 ac->ac_g_ex.fe_len = EXT4_NUM_B2C(sbi, size); in ext4_mb_normalize_request()
3601 if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) { in ext4_mb_collect_stats()
3603 atomic_add(ac->ac_b_ex.fe_len, &sbi->s_bal_allocated); in ext4_mb_collect_stats()
3604 if (ac->ac_b_ex.fe_len >= ac->ac_o_ex.fe_len) in ext4_mb_collect_stats()
3633 if (ac->ac_f_ex.fe_len == 0) in ext4_discard_allocated_blocks()
3647 ac->ac_f_ex.fe_len); in ext4_discard_allocated_blocks()
3653 pa->pa_free += ac->ac_b_ex.fe_len; in ext4_discard_allocated_blocks()
3670 start + EXT4_C2B(sbi, ac->ac_o_ex.fe_len)); in ext4_mb_use_inode_pa()
3674 ac->ac_b_ex.fe_len = len; in ext4_mb_use_inode_pa()
3692 unsigned int len = ac->ac_o_ex.fe_len; in ext4_mb_use_group_pa()
3697 ac->ac_b_ex.fe_len = len; in ext4_mb_use_group_pa()
3796 order = fls(ac->ac_o_ex.fe_len) - 1; in ext4_mb_use_preallocated()
3812 pa->pa_free >= ac->ac_o_ex.fe_len) { in ext4_mb_use_preallocated()
3997 BUG_ON(ac->ac_o_ex.fe_len >= ac->ac_b_ex.fe_len); in ext4_mb_new_inode_pa()
4004 if (ac->ac_b_ex.fe_len < ac->ac_g_ex.fe_len) { in ext4_mb_new_inode_pa()
4014 BUG_ON(ac->ac_g_ex.fe_len < ac->ac_o_ex.fe_len); in ext4_mb_new_inode_pa()
4022 wins = EXT4_C2B(sbi, ac->ac_b_ex.fe_len - ac->ac_o_ex.fe_len); in ext4_mb_new_inode_pa()
4028 EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_new_inode_pa()
4035 BUG_ON(ac->ac_o_ex.fe_len > ac->ac_b_ex.fe_len); in ext4_mb_new_inode_pa()
4044 pa->pa_len = ac->ac_b_ex.fe_len; in ext4_mb_new_inode_pa()
4085 BUG_ON(ac->ac_o_ex.fe_len >= ac->ac_b_ex.fe_len); in ext4_mb_new_group_pa()
4098 pa->pa_len = ac->ac_b_ex.fe_len; in ext4_mb_new_group_pa()
4523 (unsigned long)ac->ac_o_ex.fe_len, in ext4_mb_show_ac()
4527 (unsigned long)ac->ac_g_ex.fe_len, in ext4_mb_show_ac()
4531 (unsigned long)ac->ac_b_ex.fe_len, in ext4_mb_show_ac()
4568 size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len); in ext4_mb_group_or_file()
4639 ac->ac_o_ex.fe_len = len; in ext4_mb_initialize_context()
4822 pa->pa_pstart += EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_release_context()
4823 pa->pa_lstart += EXT4_C2B(sbi, ac->ac_b_ex.fe_len); in ext4_mb_release_context()
4824 pa->pa_free -= ac->ac_b_ex.fe_len; in ext4_mb_release_context()
4825 pa->pa_len -= ac->ac_b_ex.fe_len; in ext4_mb_release_context()
4888 freed = ext4_mb_discard_preallocations(sb, ac->ac_o_ex.fe_len); in ext4_mb_discard_preallocations_should_retry()
5011 ac->ac_o_ex.fe_len >= ac->ac_f_ex.fe_len) in ext4_mb_new_blocks()
5021 ar->len = ac->ac_b_ex.fe_len; in ext4_mb_new_blocks()
5036 ac->ac_b_ex.fe_len = 0; in ext4_mb_new_blocks()
5688 ex.fe_len = count; in ext4_trim_extent()
5698 mb_free_blocks(NULL, e4b, start, ex.fe_len); in ext4_trim_extent()