Lines Matching refs:handle

328 static int ext4_alloc_branch(handle_t *handle,  in ext4_alloc_branch()  argument
340 new_blocks[i] = ext4_mb_new_blocks(handle, ar, &err); in ext4_alloc_branch()
342 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch()
364 err = ext4_journal_get_create_access(handle, ar->inode->i_sb, in ext4_alloc_branch()
385 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch()
393 ext4_free_blocks(handle, ar->inode, NULL, new_blocks[i], in ext4_alloc_branch()
407 ext4_free_blocks(handle, ar->inode, branch[i+1].bh, in ext4_alloc_branch()
425 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument
440 err = ext4_journal_get_write_access(handle, ar->inode->i_sb, in ext4_splice_branch()
472 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch()
479 err = ext4_mark_inode_dirty(handle, ar->inode); in ext4_splice_branch()
493 ext4_free_blocks(handle, ar->inode, where[i].bh, 0, 1, in ext4_splice_branch()
496 ext4_free_blocks(handle, ar->inode, NULL, le32_to_cpu(where[num].key), in ext4_splice_branch()
530 int ext4_ind_map_blocks(handle_t *handle, struct inode *inode, in ext4_ind_map_blocks() argument
547 ASSERT(handle != NULL || (flags & EXT4_GET_BLOCKS_CREATE) == 0); in ext4_ind_map_blocks()
635 err = ext4_alloc_branch(handle, &ar, indirect_blks, in ext4_ind_map_blocks()
646 err = ext4_splice_branch(handle, &ar, partial, indirect_blks); in ext4_ind_map_blocks()
652 ext4_update_inode_fsync_trans(handle, inode, 1); in ext4_ind_map_blocks()
696 static int ext4_ind_trunc_restart_fn(handle_t *handle, struct inode *inode, in ext4_ind_trunc_restart_fn() argument
703 err = ext4_handle_dirty_metadata(handle, inode, bh); in ext4_ind_trunc_restart_fn()
707 err = ext4_mark_inode_dirty(handle, inode); in ext4_ind_trunc_restart_fn()
731 static int ext4_ind_truncate_ensure_credits(handle_t *handle, in ext4_ind_truncate_ensure_credits() argument
739 ret = ext4_journal_ensure_credits_fn(handle, EXT4_RESERVE_TRANS_BLOCKS, in ext4_ind_truncate_ensure_credits()
741 ext4_ind_trunc_restart_fn(handle, inode, bh, &dropped)); in ext4_ind_truncate_ensure_credits()
748 ret = ext4_journal_get_write_access(handle, inode->i_sb, bh, in ext4_ind_truncate_ensure_credits()
864 static int ext4_clear_blocks(handle_t *handle, struct inode *inode, in ext4_clear_blocks() argument
887 err = ext4_ind_truncate_ensure_credits(handle, inode, bh, in ext4_clear_blocks()
895 ext4_free_blocks(handle, inode, NULL, block_to_free, count, flags); in ext4_clear_blocks()
921 static void ext4_free_data(handle_t *handle, struct inode *inode, in ext4_free_data() argument
937 err = ext4_journal_get_write_access(handle, inode->i_sb, in ext4_free_data()
956 err = ext4_clear_blocks(handle, inode, this_bh, in ext4_free_data()
969 err = ext4_clear_blocks(handle, inode, this_bh, block_to_free, in ext4_free_data()
985 ext4_handle_dirty_metadata(handle, inode, this_bh); in ext4_free_data()
1007 static void ext4_free_branches(handle_t *handle, struct inode *inode, in ext4_free_branches() argument
1014 if (ext4_handle_is_aborted(handle)) in ext4_free_branches()
1049 ext4_free_branches(handle, inode, bh, in ext4_free_branches()
1071 if (ext4_handle_is_aborted(handle)) in ext4_free_branches()
1073 if (ext4_ind_truncate_ensure_credits(handle, inode, in ext4_free_branches()
1090 ext4_free_blocks(handle, inode, NULL, nr, 1, in ext4_free_branches()
1100 if (!ext4_journal_get_write_access(handle, in ext4_free_branches()
1106 ext4_handle_dirty_metadata(handle, in ext4_free_branches()
1115 ext4_free_data(handle, inode, parent_bh, first, last); in ext4_free_branches()
1119 void ext4_ind_truncate(handle_t *handle, struct inode *inode) in ext4_ind_truncate() argument
1161 ext4_free_data(handle, inode, NULL, i_data+offsets[0], in ext4_ind_truncate()
1171 ext4_free_branches(handle, inode, NULL, in ext4_ind_truncate()
1181 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_truncate()
1188 ext4_free_branches(handle, inode, partial->bh, partial->p + 1, in ext4_ind_truncate()
1201 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); in ext4_ind_truncate()
1208 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); in ext4_ind_truncate()
1215 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); in ext4_ind_truncate()
1234 int ext4_ind_remove_space(handle_t *handle, struct inode *inode, in ext4_ind_remove_space() argument
1263 ext4_free_data(handle, inode, NULL, i_data + offsets[0], in ext4_ind_remove_space()
1279 ext4_free_data(handle, inode, NULL, i_data + offsets[0], in ext4_ind_remove_space()
1289 ext4_free_branches(handle, inode, NULL, in ext4_ind_remove_space()
1295 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1306 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1340 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1369 ext4_free_branches(handle, inode, NULL, in ext4_ind_remove_space()
1376 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1404 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1419 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1426 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1455 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); in ext4_ind_remove_space()
1464 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); in ext4_ind_remove_space()
1473 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); in ext4_ind_remove_space()