Lines Matching refs:handle
61 int (*cow_duplicate_clusters)(handle_t *handle,
555 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local
578 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree()
579 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree()
580 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree()
585 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree()
592 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree()
615 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree()
638 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree()
648 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree()
677 ocfs2_commit_trans(osb, handle); in ocfs2_create_refcount_tree()
697 handle_t *handle = NULL; in ocfs2_set_refcount_tree() local
714 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_SET_CREDITS); in ocfs2_set_refcount_tree()
715 if (IS_ERR(handle)) { in ocfs2_set_refcount_tree()
716 ret = PTR_ERR(handle); in ocfs2_set_refcount_tree()
721 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_set_refcount_tree()
728 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, ref_root_bh, in ocfs2_set_refcount_tree()
738 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_set_refcount_tree()
745 ocfs2_journal_dirty(handle, di_bh); in ocfs2_set_refcount_tree()
748 ocfs2_commit_trans(osb, handle); in ocfs2_set_refcount_tree()
759 handle_t *handle = NULL; in ocfs2_remove_refcount_tree() local
815 handle = ocfs2_start_trans(osb, credits); in ocfs2_remove_refcount_tree()
816 if (IS_ERR(handle)) { in ocfs2_remove_refcount_tree()
817 ret = PTR_ERR(handle); in ocfs2_remove_refcount_tree()
822 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_remove_refcount_tree()
829 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, blk_bh, in ocfs2_remove_refcount_tree()
841 ocfs2_journal_dirty(handle, di_bh); in ocfs2_remove_refcount_tree()
844 ocfs2_journal_dirty(handle, blk_bh); in ocfs2_remove_refcount_tree()
849 ret = ocfs2_free_suballoc_bits(handle, alloc_inode, in ocfs2_remove_refcount_tree()
856 ocfs2_commit_trans(osb, handle); in ocfs2_remove_refcount_tree()
1235 static int ocfs2_change_refcount_rec(handle_t *handle, in ocfs2_change_refcount_rec() argument
1246 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_change_refcount_rec()
1271 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_change_refcount_rec()
1276 static int ocfs2_expand_inline_ref_root(handle_t *handle, in ocfs2_expand_inline_ref_root() argument
1292 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_expand_inline_ref_root()
1299 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_expand_inline_ref_root()
1315 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_expand_inline_ref_root()
1337 ocfs2_journal_dirty(handle, new_bh); in ocfs2_expand_inline_ref_root()
1349 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_expand_inline_ref_root()
1514 static int ocfs2_new_leaf_refcount_block(handle_t *handle, in ocfs2_new_leaf_refcount_block() argument
1533 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_new_leaf_refcount_block()
1540 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_new_leaf_refcount_block()
1547 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_new_leaf_refcount_block()
1563 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_new_leaf_refcount_block()
1591 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_new_leaf_refcount_block()
1592 ocfs2_journal_dirty(handle, new_bh); in ocfs2_new_leaf_refcount_block()
1600 ret = ocfs2_insert_extent(handle, &ref_et, new_cpos, new_bh->b_blocknr, in ocfs2_new_leaf_refcount_block()
1610 static int ocfs2_expand_refcount_tree(handle_t *handle, in ocfs2_expand_refcount_tree() argument
1624 ret = ocfs2_expand_inline_ref_root(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1637 ret = ocfs2_new_leaf_refcount_block(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1652 static int ocfs2_adjust_refcount_rec(handle_t *handle, in ocfs2_adjust_refcount_rec() argument
1694 ret = ocfs2_extend_trans(handle, 2); in ocfs2_adjust_refcount_rec()
1700 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_adjust_refcount_rec()
1707 ret = ocfs2_journal_access_eb(handle, ci, path_leaf_bh(path), in ocfs2_adjust_refcount_rec()
1728 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_adjust_refcount_rec()
1729 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_adjust_refcount_rec()
1736 static int ocfs2_insert_refcount_rec(handle_t *handle, in ocfs2_insert_refcount_rec() argument
1756 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_insert_refcount_rec()
1776 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_insert_refcount_rec()
1801 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_insert_refcount_rec()
1804 ret = ocfs2_adjust_refcount_rec(handle, ci, in ocfs2_insert_refcount_rec()
1824 static int ocfs2_split_refcount_rec(handle_t *handle, in ocfs2_split_refcount_rec() argument
1882 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_split_refcount_rec()
1907 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_split_refcount_rec()
1973 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_split_refcount_rec()
1980 static int __ocfs2_increase_refcount(handle_t *handle, in __ocfs2_increase_refcount() argument
2022 ret = ocfs2_change_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2035 ret = ocfs2_insert_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_increase_refcount()
2053 ret = ocfs2_split_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2074 static int ocfs2_remove_refcount_extent(handle_t *handle, in ocfs2_remove_refcount_extent() argument
2095 ret = ocfs2_remove_extent(handle, &et, le32_to_cpu(rb->rf_cpos), in ocfs2_remove_refcount_extent()
2118 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_remove_refcount_extent()
2148 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_remove_refcount_extent()
2154 int ocfs2_increase_refcount(handle_t *handle, in ocfs2_increase_refcount() argument
2161 return __ocfs2_increase_refcount(handle, ci, ref_root_bh, in ocfs2_increase_refcount()
2166 static int ocfs2_decrease_refcount_rec(handle_t *handle, in ocfs2_decrease_refcount_rec() argument
2189 ret = ocfs2_change_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2198 ret = ocfs2_split_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2211 ret = ocfs2_remove_refcount_extent(handle, ci, ref_root_bh, in ocfs2_decrease_refcount_rec()
2222 static int __ocfs2_decrease_refcount(handle_t *handle, in __ocfs2_decrease_refcount() argument
2257 ret = ocfs2_decrease_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_decrease_refcount()
2289 handle_t *handle, u32 cpos, u32 len, in ocfs2_decrease_refcount() argument
2320 ret = __ocfs2_decrease_refcount(handle, &tree->rf_ci, ref_root_bh, in ocfs2_decrease_refcount()
2340 handle_t *handle, u32 cpos, in ocfs2_mark_extent_refcounted() argument
2356 ret = ocfs2_change_extent_flag(handle, et, cpos, in ocfs2_mark_extent_refcounted()
2896 static int ocfs2_clear_cow_buffer(handle_t *handle, struct buffer_head *bh) in ocfs2_clear_cow_buffer() argument
2905 int ocfs2_duplicate_clusters_by_page(handle_t *handle, in ocfs2_duplicate_clusters_by_page() argument
2975 ret = walk_page_buffers(handle, page_buffers(page), in ocfs2_duplicate_clusters_by_page()
2985 handle, from, to, in ocfs2_duplicate_clusters_by_page()
3000 int ocfs2_duplicate_clusters_by_jbd(handle_t *handle, in ocfs2_duplicate_clusters_by_jbd() argument
3034 ret = ocfs2_journal_access(handle, ci, new_bh, in ocfs2_duplicate_clusters_by_jbd()
3042 ocfs2_journal_dirty(handle, new_bh); in ocfs2_duplicate_clusters_by_jbd()
3055 static int ocfs2_clear_ext_refcount(handle_t *handle, in ocfs2_clear_ext_refcount() argument
3103 ret = ocfs2_split_extent(handle, et, path, index, in ocfs2_clear_ext_refcount()
3113 static int ocfs2_replace_clusters(handle_t *handle, in ocfs2_replace_clusters() argument
3128 ret = context->cow_duplicate_clusters(handle, context->inode, in ocfs2_replace_clusters()
3136 ret = ocfs2_clear_ext_refcount(handle, &context->data_et, in ocfs2_replace_clusters()
3213 handle_t *handle; in ocfs2_make_clusters_writable() local
3236 handle = ocfs2_start_trans(osb, credits); in ocfs2_make_clusters_writable()
3237 if (IS_ERR(handle)) { in ocfs2_make_clusters_writable()
3238 ret = PTR_ERR(handle); in ocfs2_make_clusters_writable()
3268 ret = ocfs2_clear_ext_refcount(handle, in ocfs2_make_clusters_writable()
3281 ret = __ocfs2_claim_clusters(handle, in ocfs2_make_clusters_writable()
3290 ret = ocfs2_replace_clusters(handle, context, in ocfs2_make_clusters_writable()
3300 ret = __ocfs2_decrease_refcount(handle, ref_ci, in ocfs2_make_clusters_writable()
3319 ret = context->post_refcount->func(context->inode, handle, in ocfs2_make_clusters_writable()
3339 ocfs2_commit_trans(osb, handle); in ocfs2_make_clusters_writable()
3692 handle_t *handle; in ocfs2_add_refcount_flag() local
3723 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcount_flag()
3724 if (IS_ERR(handle)) { in ocfs2_add_refcount_flag()
3725 ret = PTR_ERR(handle); in ocfs2_add_refcount_flag()
3730 ret = ocfs2_mark_extent_refcounted(inode, data_et, handle, in ocfs2_add_refcount_flag()
3738 ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcount_flag()
3747 ret = post->func(inode, handle, post->para); in ocfs2_add_refcount_flag()
3753 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcount_flag()
3764 handle_t *handle; in ocfs2_change_ctime() local
3767 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_change_ctime()
3769 if (IS_ERR(handle)) { in ocfs2_change_ctime()
3770 ret = PTR_ERR(handle); in ocfs2_change_ctime()
3775 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_change_ctime()
3786 ocfs2_journal_dirty(handle, di_bh); in ocfs2_change_ctime()
3789 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_change_ctime()
3905 handle_t *handle; in ocfs2_add_refcounted_extent() local
3920 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcounted_extent()
3921 if (IS_ERR(handle)) { in ocfs2_add_refcounted_extent()
3922 ret = PTR_ERR(handle); in ocfs2_add_refcounted_extent()
3927 ret = ocfs2_insert_extent(handle, et, cpos, in ocfs2_add_refcounted_extent()
3935 ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcounted_extent()
3949 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcounted_extent()
3962 handle_t *handle; in ocfs2_duplicate_inline_data() local
3969 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_duplicate_inline_data()
3970 if (IS_ERR(handle)) { in ocfs2_duplicate_inline_data()
3971 ret = PTR_ERR(handle); in ocfs2_duplicate_inline_data()
3976 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_duplicate_inline_data()
3991 ocfs2_journal_dirty(handle, t_bh); in ocfs2_duplicate_inline_data()
3994 ocfs2_commit_trans(osb, handle); in ocfs2_duplicate_inline_data()
4058 handle_t *handle; in ocfs2_complete_reflink() local
4063 handle = ocfs2_start_trans(OCFS2_SB(t_inode->i_sb), in ocfs2_complete_reflink()
4065 if (IS_ERR(handle)) { in ocfs2_complete_reflink()
4066 ret = PTR_ERR(handle); in ocfs2_complete_reflink()
4071 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_complete_reflink()
4115 ocfs2_journal_dirty(handle, t_bh); in ocfs2_complete_reflink()
4118 ocfs2_commit_trans(OCFS2_SB(t_inode->i_sb), handle); in ocfs2_complete_reflink()
4467 handle_t *handle; in ocfs2_reflink_update_dest() local
4475 handle = ocfs2_start_trans(OCFS2_SB(dest->i_sb), in ocfs2_reflink_update_dest()
4477 if (IS_ERR(handle)) { in ocfs2_reflink_update_dest()
4478 ret = PTR_ERR(handle); in ocfs2_reflink_update_dest()
4490 ret = ocfs2_mark_inode_dirty(handle, dest, d_bh); in ocfs2_reflink_update_dest()
4497 ocfs2_commit_trans(OCFS2_SB(dest->i_sb), handle); in ocfs2_reflink_update_dest()