• Home
  • Raw
  • Download

Lines Matching refs:max

402 static inline int mb_find_next_zero_bit(void *addr, int max, int start)  in mb_find_next_zero_bit()  argument
406 tmpmax = max + fix; in mb_find_next_zero_bit()
410 if (ret > max) in mb_find_next_zero_bit()
411 return max; in mb_find_next_zero_bit()
415 static inline int mb_find_next_bit(void *addr, int max, int start) in mb_find_next_bit() argument
419 tmpmax = max + fix; in mb_find_next_bit()
423 if (ret > max) in mb_find_next_bit()
424 return max; in mb_find_next_bit()
428 static void *mb_find_buddy(struct ext4_buddy *e4b, int order, int *max) in mb_find_buddy() argument
433 BUG_ON(max == NULL); in mb_find_buddy()
436 *max = 0; in mb_find_buddy()
442 *max = 1 << (e4b->bd_blkbits + 3); in mb_find_buddy()
447 *max = EXT4_SB(e4b->bd_sb)->s_mb_maxs[order]; in mb_find_buddy()
548 int max; in __mb_check_buddy() local
568 buddy = mb_find_buddy(e4b, order, &max); in __mb_check_buddy()
573 MB_CHECK_ASSERT(max * 2 == max2); in __mb_check_buddy()
576 for (i = 0; i < max; i++) { in __mb_check_buddy()
606 buddy = mb_find_buddy(e4b, 0, &max); in __mb_check_buddy()
607 for (i = 0; i < max; i++) { in __mb_check_buddy()
659 ext4_grpblk_t max; in ext4_mb_mark_free_simple() local
669 max = ffs(first | border) - 1; in ext4_mb_mark_free_simple()
674 if (max < min) in ext4_mb_mark_free_simple()
675 min = max; in ext4_mb_mark_free_simple()
716 ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb); in ext4_mb_generate_buddy() local
726 i = mb_find_next_zero_bit(bitmap, max, 0); in ext4_mb_generate_buddy()
728 while (i < max) { in ext4_mb_generate_buddy()
731 i = mb_find_next_bit(bitmap, max, i); in ext4_mb_generate_buddy()
738 if (i < max) in ext4_mb_generate_buddy()
739 i = mb_find_next_zero_bit(bitmap, max, i); in ext4_mb_generate_buddy()
1358 int max; in mb_buddy_mark_free() local
1360 void *buddy = mb_find_buddy(e4b, order, &max); in mb_buddy_mark_free()
1402 if (first == last || !(buddy2 = mb_find_buddy(e4b, order, &max))) { in mb_buddy_mark_free()
1497 int max, order; in mb_find_extent() local
1503 buddy = mb_find_buddy(e4b, 0, &max); in mb_find_extent()
1505 BUG_ON(block >= max); in mb_find_extent()
1527 mb_find_buddy(e4b, order, &max)) { in mb_find_extent()
1529 if (block + 1 >= max) in mb_find_extent()
1560 int max = 0; in mb_mark_used() local
1582 max = !mb_test_bit(start + len, e4b->bd_bitmap); in mb_mark_used()
1583 if (mlen && max) in mb_mark_used()
1585 else if (!mlen && !max) in mb_mark_used()
1595 buddy = mb_find_buddy(e4b, ord, &max); in mb_mark_used()
1596 BUG_ON((start >> ord) >= max); in mb_mark_used()
1611 buddy = mb_find_buddy(e4b, ord, &max); in mb_mark_used()
1617 buddy = mb_find_buddy(e4b, ord, &max); in mb_mark_used()
1687 int max; in ext4_mb_check_limits() local
1711 max = mb_find_extent(e4b, bex->fe_start, gex->fe_len, &ex); in ext4_mb_check_limits()
1712 if (max >= gex->fe_len) { in ext4_mb_check_limits()
1794 int max; in ext4_mb_try_best_found() local
1803 max = mb_find_extent(e4b, ex.fe_start, ex.fe_len, &ex); in ext4_mb_try_best_found()
1805 if (max > 0) { in ext4_mb_try_best_found()
1821 int max; in ext4_mb_find_by_goal() local
1842 max = mb_find_extent(e4b, ac->ac_g_ex.fe_start, in ext4_mb_find_by_goal()
1846 if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) { in ext4_mb_find_by_goal()
1857 } else if (max >= ac->ac_g_ex.fe_len) { in ext4_mb_find_by_goal()
1864 } else if (max > 0 && (ac->ac_flags & EXT4_MB_HINT_MERGE)) { in ext4_mb_find_by_goal()
1893 int max; in ext4_mb_simple_scan_group() local
1900 buddy = mb_find_buddy(e4b, i, &max); in ext4_mb_simple_scan_group()
1903 k = mb_find_next_zero_bit(buddy, max, 0); in ext4_mb_simple_scan_group()
1904 BUG_ON(k >= max); in ext4_mb_simple_scan_group()
2002 int max; in ext4_mb_scan_aligned() local
2015 max = mb_find_extent(e4b, i, sbi->s_stripe, &ex); in ext4_mb_scan_aligned()
2016 if (max >= sbi->s_stripe) { in ext4_mb_scan_aligned()
2572 unsigned max; in ext4_mb_init() local
2601 max = sb->s_blocksize << 2; in ext4_mb_init()
2604 sbi->s_mb_maxs[i] = max; in ext4_mb_init()
2607 max = max >> 1; in ext4_mb_init()
2633 sbi->s_mb_group_prealloc = max(MB_DEFAULT_GROUP_PREALLOC >> in ext4_mb_init()
3065 int bsbits, max; in ext4_mb_normalize_request() local
3103 max = 2 << bsbits; in ext4_mb_normalize_request()
3105 #define NRL_CHECK_SIZE(req, size, max, chunk_size) \ in ext4_mb_normalize_request() argument
3106 (req <= (size) || max <= (chunk_size)) in ext4_mb_normalize_request()
3125 } else if (NRL_CHECK_SIZE(size, 4 * 1024 * 1024, max, 2 * 1024)) { in ext4_mb_normalize_request()
3129 } else if (NRL_CHECK_SIZE(size, 8 * 1024 * 1024, max, 4 * 1024)) { in ext4_mb_normalize_request()
3134 (8<<20)>>bsbits, max, 8 * 1024)) { in ext4_mb_normalize_request()
4193 size = max(size, isize); in ext4_mb_group_or_file()
5155 ext4_grpblk_t start, ext4_grpblk_t max, in ext4_trim_all_free() argument
5163 trace_ext4_trim_all_free(sb, group, start, max); in ext4_trim_all_free()
5181 while (start <= max) { in ext4_trim_all_free()
5182 start = mb_find_next_zero_bit(bitmap, max + 1, start); in ext4_trim_all_free()
5183 if (start > max) in ext4_trim_all_free()
5185 next = mb_find_next_bit(bitmap, max + 1, start); in ext4_trim_all_free()