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()
64 static int update_extent_range(handle_t *handle, struct inode *inode, in update_extent_range() argument
82 retval = finish_range(handle, inode, lb); in update_extent_range()
89 static int update_ind_extent_range(handle_t *handle, struct inode *inode, in update_ind_extent_range() argument
105 retval = update_extent_range(handle, inode, in update_ind_extent_range()
118 static int update_dind_extent_range(handle_t *handle, struct inode *inode, in update_dind_extent_range() argument
134 retval = update_ind_extent_range(handle, inode, in update_dind_extent_range()
148 static int update_tind_extent_range(handle_t *handle, struct inode *inode, in update_tind_extent_range() argument
164 retval = update_dind_extent_range(handle, inode, in update_tind_extent_range()
178 static int free_dind_blocks(handle_t *handle, in free_dind_blocks() argument
195 err = ext4_journal_ensure_credits(handle, in free_dind_blocks()
202 ext4_free_blocks(handle, inode, NULL, in free_dind_blocks()
209 err = ext4_journal_ensure_credits(handle, EXT4_RESERVE_TRANS_BLOCKS, in free_dind_blocks()
213 ext4_free_blocks(handle, inode, NULL, le32_to_cpu(i_data), 1, in free_dind_blocks()
219 static int free_tind_blocks(handle_t *handle, in free_tind_blocks() argument
234 retval = free_dind_blocks(handle, in free_tind_blocks()
243 retval = ext4_journal_ensure_credits(handle, EXT4_RESERVE_TRANS_BLOCKS, in free_tind_blocks()
247 ext4_free_blocks(handle, inode, NULL, le32_to_cpu(i_data), 1, in free_tind_blocks()
253 static int free_ind_block(handle_t *handle, struct inode *inode, __le32 *i_data) in free_ind_block() argument
259 retval = ext4_journal_ensure_credits(handle, in free_ind_block()
264 ext4_free_blocks(handle, inode, NULL, in free_ind_block()
272 retval = free_dind_blocks(handle, inode, i_data[1]); in free_ind_block()
279 retval = free_tind_blocks(handle, inode, i_data[2]); in free_ind_block()
286 static int ext4_ext_swap_inode_data(handle_t *handle, struct inode *inode, in ext4_ext_swap_inode_data() argument
298 retval = ext4_journal_ensure_credits(handle, 1, 0); in ext4_ext_swap_inode_data()
343 retval = free_ind_block(handle, inode, i_data); in ext4_ext_swap_inode_data()
344 retval2 = ext4_mark_inode_dirty(handle, inode); in ext4_ext_swap_inode_data()
352 static int free_ext_idx(handle_t *handle, struct inode *inode, in free_ext_idx() argument
369 retval = free_ext_idx(handle, inode, ix); in free_ext_idx()
377 retval = ext4_journal_ensure_credits(handle, EXT4_RESERVE_TRANS_BLOCKS, in free_ext_idx()
381 ext4_free_blocks(handle, inode, NULL, block, 1, in free_ext_idx()
389 static int free_ext_block(handle_t *handle, struct inode *inode) in free_ext_block() argument
402 retval = free_ext_idx(handle, inode, ix); in free_ext_block()
411 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()
477 ext4_ext_tree_init(handle, tmp_inode); in ext4_ext_migrate()
478 ext4_journal_stop(handle); in ext4_ext_migrate()
500 handle = ext4_journal_start(inode, EXT4_HT_MIGRATE, 1); in ext4_ext_migrate()
501 if (IS_ERR(handle)) { in ext4_ext_migrate()
502 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()
582 ext4_ext_tree_init(handle, tmp_inode); in ext4_ext_migrate()
584 ext4_journal_stop(handle); in ext4_ext_migrate()
606 handle_t *handle; in ext4_ind_migrate() local
627 handle = ext4_journal_start(inode, EXT4_HT_MIGRATE, 1); in ext4_ind_migrate()
628 if (IS_ERR(handle)) { in ext4_ind_migrate()
629 ret = PTR_ERR(handle); in ext4_ind_migrate()
662 ret2 = ext4_mark_inode_dirty(handle, inode); in ext4_ind_migrate()
667 ext4_journal_stop(handle); in ext4_ind_migrate()