Lines Matching refs:handle
21 static int finish_range(handle_t *handle, struct inode *inode, in finish_range() argument
53 retval = ext4_datasem_ensure_credits(handle, inode, needed, needed, 0); in finish_range()
56 retval = ext4_ext_insert_extent(handle, inode, &path, &newext, 0); in finish_range()
65 static int update_extent_range(handle_t *handle, struct inode *inode, in update_extent_range() argument
83 retval = finish_range(handle, inode, lb); in update_extent_range()
90 static int update_ind_extent_range(handle_t *handle, struct inode *inode, in update_ind_extent_range() argument
106 retval = update_extent_range(handle, inode, in update_ind_extent_range()
119 static int update_dind_extent_range(handle_t *handle, struct inode *inode, in update_dind_extent_range() argument
135 retval = update_ind_extent_range(handle, inode, in update_dind_extent_range()
149 static int update_tind_extent_range(handle_t *handle, struct inode *inode, in update_tind_extent_range() argument
165 retval = update_dind_extent_range(handle, inode, in update_tind_extent_range()
179 static int free_dind_blocks(handle_t *handle, in free_dind_blocks() argument
196 err = ext4_journal_ensure_credits(handle, in free_dind_blocks()
203 ext4_free_blocks(handle, inode, NULL, in free_dind_blocks()
210 err = ext4_journal_ensure_credits(handle, EXT4_RESERVE_TRANS_BLOCKS, in free_dind_blocks()
214 ext4_free_blocks(handle, inode, NULL, le32_to_cpu(i_data), 1, in free_dind_blocks()
220 static int free_tind_blocks(handle_t *handle, in free_tind_blocks() argument
235 retval = free_dind_blocks(handle, in free_tind_blocks()
244 retval = ext4_journal_ensure_credits(handle, EXT4_RESERVE_TRANS_BLOCKS, in free_tind_blocks()
248 ext4_free_blocks(handle, inode, NULL, le32_to_cpu(i_data), 1, in free_tind_blocks()
254 static int free_ind_block(handle_t *handle, struct inode *inode, __le32 *i_data) in free_ind_block() argument
260 retval = ext4_journal_ensure_credits(handle, in free_ind_block()
265 ext4_free_blocks(handle, inode, NULL, in free_ind_block()
273 retval = free_dind_blocks(handle, inode, i_data[1]); in free_ind_block()
280 retval = free_tind_blocks(handle, inode, i_data[2]); in free_ind_block()
287 static int ext4_ext_swap_inode_data(handle_t *handle, struct inode *inode, in ext4_ext_swap_inode_data() argument
299 retval = ext4_journal_ensure_credits(handle, 1, 0); in ext4_ext_swap_inode_data()
344 retval = free_ind_block(handle, inode, i_data); in ext4_ext_swap_inode_data()
345 retval2 = ext4_mark_inode_dirty(handle, inode); in ext4_ext_swap_inode_data()
353 static int free_ext_idx(handle_t *handle, struct inode *inode, in free_ext_idx() argument
370 retval = free_ext_idx(handle, inode, ix); in free_ext_idx()
378 retval = ext4_journal_ensure_credits(handle, EXT4_RESERVE_TRANS_BLOCKS, in free_ext_idx()
382 ext4_free_blocks(handle, inode, NULL, block, 1, in free_ext_idx()
390 static int free_ext_block(handle_t *handle, struct inode *inode) in free_ext_block() argument
403 retval = free_ext_idx(handle, inode, ix); in free_ext_block()
413 handle_t *handle; in ext4_ext_migrate() local
444 handle = ext4_journal_start(inode, EXT4_HT_MIGRATE, in ext4_ext_migrate()
447 if (IS_ERR(handle)) { in ext4_ext_migrate()
448 retval = PTR_ERR(handle); in ext4_ext_migrate()
455 tmp_inode = ext4_new_inode(handle, d_inode(inode->i_sb->s_root), in ext4_ext_migrate()
459 ext4_journal_stop(handle); in ext4_ext_migrate()
469 ext4_ext_tree_init(handle, tmp_inode); in ext4_ext_migrate()
470 ext4_orphan_add(handle, tmp_inode); in ext4_ext_migrate()
471 ext4_journal_stop(handle); in ext4_ext_migrate()
493 handle = ext4_journal_start(inode, EXT4_HT_MIGRATE, 1); in ext4_ext_migrate()
494 if (IS_ERR(handle)) { in ext4_ext_migrate()
501 retval = PTR_ERR(handle); in ext4_ext_migrate()
513 retval = update_extent_range(handle, tmp_inode, in ext4_ext_migrate()
521 retval = update_ind_extent_range(handle, tmp_inode, in ext4_ext_migrate()
528 retval = update_dind_extent_range(handle, tmp_inode, in ext4_ext_migrate()
535 retval = update_tind_extent_range(handle, tmp_inode, in ext4_ext_migrate()
543 retval = finish_range(handle, tmp_inode, &lb); in ext4_ext_migrate()
550 free_ext_block(handle, tmp_inode); in ext4_ext_migrate()
552 retval = ext4_ext_swap_inode_data(handle, inode, tmp_inode); in ext4_ext_migrate()
558 free_ext_block(handle, tmp_inode); in ext4_ext_migrate()
562 retval = ext4_journal_ensure_credits(handle, 1, 0); in ext4_ext_migrate()
581 ext4_ext_tree_init(handle, tmp_inode); in ext4_ext_migrate()
583 ext4_journal_stop(handle); in ext4_ext_migrate()
605 handle_t *handle; in ext4_ind_migrate() local
625 handle = ext4_journal_start(inode, EXT4_HT_MIGRATE, 1); in ext4_ind_migrate()
626 if (IS_ERR(handle)) { in ext4_ind_migrate()
627 ret = PTR_ERR(handle); in ext4_ind_migrate()
660 ret2 = ext4_mark_inode_dirty(handle, inode); in ext4_ind_migrate()
664 ext4_journal_stop(handle); in ext4_ind_migrate()