Lines Matching refs:ar
4047 struct ext4_allocation_request *ar) in ext4_mb_normalize_request() argument
4145 if (ar->pleft && start <= ar->lleft) { in ext4_mb_normalize_request()
4146 size -= ar->lleft + 1 - start; in ext4_mb_normalize_request()
4147 start = ar->lleft + 1; in ext4_mb_normalize_request()
4149 if (ar->pright && start + size - 1 >= ar->lright) in ext4_mb_normalize_request()
4150 size -= start + size - ar->lright; in ext4_mb_normalize_request()
4232 if (ar->pright && (ar->lright == (start + size)) && in ext4_mb_normalize_request()
4233 ar->pright >= size && in ext4_mb_normalize_request()
4234 ar->pright - size >= le32_to_cpu(es->s_first_data_block)) { in ext4_mb_normalize_request()
4236 ext4_get_group_no_and_offset(ac->ac_sb, ar->pright - size, in ext4_mb_normalize_request()
4241 if (ar->pleft && (ar->lleft + 1 == start) && in ext4_mb_normalize_request()
4242 ar->pleft + 1 < ext4_blocks_count(es)) { in ext4_mb_normalize_request()
4244 ext4_get_group_no_and_offset(ac->ac_sb, ar->pleft + 1, in ext4_mb_normalize_request()
5280 struct ext4_allocation_request *ar) in ext4_mb_initialize_context() argument
5282 struct super_block *sb = ar->inode->i_sb; in ext4_mb_initialize_context()
5291 len = ar->len; in ext4_mb_initialize_context()
5298 goal = ar->goal; in ext4_mb_initialize_context()
5305 ac->ac_b_ex.fe_logical = EXT4_LBLK_CMASK(sbi, ar->logical); in ext4_mb_initialize_context()
5308 ac->ac_inode = ar->inode; in ext4_mb_initialize_context()
5314 ac->ac_flags = ar->flags; in ext4_mb_initialize_context()
5322 (unsigned) ar->len, (unsigned) ar->logical, in ext4_mb_initialize_context()
5323 (unsigned) ar->goal, ac->ac_flags, ac->ac_2order, in ext4_mb_initialize_context()
5324 (unsigned) ar->lleft, (unsigned) ar->pleft, in ext4_mb_initialize_context()
5325 (unsigned) ar->lright, (unsigned) ar->pright, in ext4_mb_initialize_context()
5326 inode_is_open_for_write(ar->inode) ? "" : "non-"); in ext4_mb_initialize_context()
5590 struct ext4_allocation_request *ar, int *errp);
5598 struct ext4_allocation_request *ar, int *errp) in ext4_mb_new_blocks() argument
5610 sb = ar->inode->i_sb; in ext4_mb_new_blocks()
5613 trace_ext4_request_blocks(ar); in ext4_mb_new_blocks()
5615 return ext4_mb_new_blocks_simple(handle, ar, errp); in ext4_mb_new_blocks()
5618 if (ext4_is_quota_file(ar->inode)) in ext4_mb_new_blocks()
5619 ar->flags |= EXT4_MB_USE_ROOT_BLOCKS; in ext4_mb_new_blocks()
5621 if ((ar->flags & EXT4_MB_DELALLOC_RESERVED) == 0) { in ext4_mb_new_blocks()
5626 while (ar->len && in ext4_mb_new_blocks()
5627 ext4_claim_free_clusters(sbi, ar->len, ar->flags)) { in ext4_mb_new_blocks()
5631 ar->len = ar->len >> 1; in ext4_mb_new_blocks()
5633 if (!ar->len) { in ext4_mb_new_blocks()
5638 reserv_clstrs = ar->len; in ext4_mb_new_blocks()
5639 if (ar->flags & EXT4_MB_USE_ROOT_BLOCKS) { in ext4_mb_new_blocks()
5640 dquot_alloc_block_nofail(ar->inode, in ext4_mb_new_blocks()
5641 EXT4_C2B(sbi, ar->len)); in ext4_mb_new_blocks()
5643 while (ar->len && in ext4_mb_new_blocks()
5644 dquot_alloc_block(ar->inode, in ext4_mb_new_blocks()
5645 EXT4_C2B(sbi, ar->len))) { in ext4_mb_new_blocks()
5647 ar->flags |= EXT4_MB_HINT_NOPREALLOC; in ext4_mb_new_blocks()
5648 ar->len--; in ext4_mb_new_blocks()
5651 inquota = ar->len; in ext4_mb_new_blocks()
5652 if (ar->len == 0) { in ext4_mb_new_blocks()
5660 ar->len = 0; in ext4_mb_new_blocks()
5665 *errp = ext4_mb_initialize_context(ac, ar); in ext4_mb_new_blocks()
5667 ar->len = 0; in ext4_mb_new_blocks()
5675 ext4_mb_normalize_request(ac, ar); in ext4_mb_new_blocks()
5706 ar->len = ac->ac_b_ex.fe_len; in ext4_mb_new_blocks()
5723 ar->len = 0; in ext4_mb_new_blocks()
5730 if (inquota && ar->len < inquota) in ext4_mb_new_blocks()
5731 dquot_free_block(ar->inode, EXT4_C2B(sbi, inquota - ar->len)); in ext4_mb_new_blocks()
5732 if (!ar->len) { in ext4_mb_new_blocks()
5733 if ((ar->flags & EXT4_MB_DELALLOC_RESERVED) == 0) in ext4_mb_new_blocks()
5739 trace_ext4_allocate_blocks(ar, (unsigned long long)block); in ext4_mb_new_blocks()
5851 struct ext4_allocation_request *ar, int *errp) in ext4_mb_new_blocks_simple() argument
5854 struct super_block *sb = ar->inode->i_sb; in ext4_mb_new_blocks_simple()
5862 goal = ar->goal; in ext4_mb_new_blocks_simple()
5867 ar->len = 0; in ext4_mb_new_blocks_simple()
5903 ar->len = 1; in ext4_mb_new_blocks_simple()