Lines Matching refs:order
441 static void *mb_find_buddy(struct ext4_buddy *e4b, int order, int *max) in mb_find_buddy() argument
448 if (order > e4b->bd_blkbits + 1) { in mb_find_buddy()
454 if (order == 0) { in mb_find_buddy()
459 bb = e4b->bd_buddy + EXT4_SB(e4b->bd_sb)->s_mb_offsets[order]; in mb_find_buddy()
460 *max = EXT4_SB(e4b->bd_sb)->s_mb_maxs[order]; in mb_find_buddy()
558 int order = e4b->bd_blkbits + 1; in __mb_check_buddy() local
578 while (order > 1) { in __mb_check_buddy()
579 buddy = mb_find_buddy(e4b, order, &max); in __mb_check_buddy()
581 buddy2 = mb_find_buddy(e4b, order - 1, &max2); in __mb_check_buddy()
605 for (j = 0; j < (1 << order); j++) { in __mb_check_buddy()
606 k = (i * (1 << order)) + j; in __mb_check_buddy()
612 MB_CHECK_ASSERT(e4b->bd_info->bb_counters[order] == count); in __mb_check_buddy()
613 order--; in __mb_check_buddy()
783 int order = 1; in mb_regenerate_buddy() local
786 while ((buddy = mb_find_buddy(e4b, order++, &count))) { in mb_regenerate_buddy()
1261 int order = 1; in mb_find_order_for_block() local
1269 while (order <= e4b->bd_blkbits + 1) { in mb_find_order_for_block()
1273 return order; in mb_find_order_for_block()
1277 order++; in mb_find_order_for_block()
1365 int order = 1; in mb_buddy_mark_free() local
1366 void *buddy = mb_find_buddy(e4b, order, &max); in mb_buddy_mark_free()
1401 e4b->bd_info->bb_counters[order] += mb_buddy_adjust_border(&first, buddy, -1); in mb_buddy_mark_free()
1403 e4b->bd_info->bb_counters[order] += mb_buddy_adjust_border(&last, buddy, 1); in mb_buddy_mark_free()
1406 order++; in mb_buddy_mark_free()
1408 if (first == last || !(buddy2 = mb_find_buddy(e4b, order, &max))) { in mb_buddy_mark_free()
1410 e4b->bd_info->bb_counters[order - 1] += last - first + 1; in mb_buddy_mark_free()
1507 int max, order; in mb_find_extent() local
1524 order = mb_find_order_for_block(e4b, block); in mb_find_extent()
1525 block = block >> order; in mb_find_extent()
1527 ex->fe_len = 1 << order; in mb_find_extent()
1528 ex->fe_start = block << order; in mb_find_extent()
1537 mb_find_buddy(e4b, order, &max)) { in mb_find_extent()
1542 next = (block + 1) * (1 << order); in mb_find_extent()
1546 order = mb_find_order_for_block(e4b, next); in mb_find_extent()
1548 block = next >> order; in mb_find_extent()
1549 ex->fe_len += 1 << order; in mb_find_extent()
3359 int order, i; in ext4_mb_use_preallocated() local
3408 order = fls(ac->ac_o_ex.fe_len) - 1; in ext4_mb_use_preallocated()
3409 if (order > PREALLOC_TB_SIZE - 1) in ext4_mb_use_preallocated()
3411 order = PREALLOC_TB_SIZE - 1; in ext4_mb_use_preallocated()
3418 for (i = order; i < PREALLOC_TB_SIZE; i++) { in ext4_mb_use_preallocated()
4225 int order, int total_entries) in ext4_mb_discard_lg_preallocations() argument
4237 list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[order], in ext4_mb_discard_lg_preallocations()
4306 int order, added = 0, lg_prealloc_count = 1; in ext4_mb_add_n_trim() local
4311 order = fls(pa->pa_free) - 1; in ext4_mb_add_n_trim()
4312 if (order > PREALLOC_TB_SIZE - 1) in ext4_mb_add_n_trim()
4314 order = PREALLOC_TB_SIZE - 1; in ext4_mb_add_n_trim()
4317 list_for_each_entry_rcu(tmp_pa, &lg->lg_prealloc_list[order], in ext4_mb_add_n_trim()
4339 &lg->lg_prealloc_list[order]); in ext4_mb_add_n_trim()
4345 order, lg_prealloc_count); in ext4_mb_add_n_trim()