Lines Matching refs:handle

68 	int (*cow_duplicate_clusters)(handle_t *handle,
561 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local
584 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree()
585 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree()
586 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree()
591 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree()
598 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree()
621 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree()
644 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree()
654 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree()
683 ocfs2_commit_trans(osb, handle); in ocfs2_create_refcount_tree()
703 handle_t *handle = NULL; in ocfs2_set_refcount_tree() local
720 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_SET_CREDITS); in ocfs2_set_refcount_tree()
721 if (IS_ERR(handle)) { in ocfs2_set_refcount_tree()
722 ret = PTR_ERR(handle); in ocfs2_set_refcount_tree()
727 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_set_refcount_tree()
734 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, ref_root_bh, in ocfs2_set_refcount_tree()
744 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_set_refcount_tree()
751 ocfs2_journal_dirty(handle, di_bh); in ocfs2_set_refcount_tree()
754 ocfs2_commit_trans(osb, handle); in ocfs2_set_refcount_tree()
765 handle_t *handle = NULL; in ocfs2_remove_refcount_tree() local
821 handle = ocfs2_start_trans(osb, credits); in ocfs2_remove_refcount_tree()
822 if (IS_ERR(handle)) { in ocfs2_remove_refcount_tree()
823 ret = PTR_ERR(handle); in ocfs2_remove_refcount_tree()
828 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_remove_refcount_tree()
835 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, blk_bh, in ocfs2_remove_refcount_tree()
847 ocfs2_journal_dirty(handle, di_bh); in ocfs2_remove_refcount_tree()
850 ocfs2_journal_dirty(handle, blk_bh); in ocfs2_remove_refcount_tree()
855 ret = ocfs2_free_suballoc_bits(handle, alloc_inode, in ocfs2_remove_refcount_tree()
862 ocfs2_commit_trans(osb, handle); in ocfs2_remove_refcount_tree()
1241 static int ocfs2_change_refcount_rec(handle_t *handle, in ocfs2_change_refcount_rec() argument
1252 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_change_refcount_rec()
1277 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_change_refcount_rec()
1282 static int ocfs2_expand_inline_ref_root(handle_t *handle, in ocfs2_expand_inline_ref_root() argument
1298 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_expand_inline_ref_root()
1305 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_expand_inline_ref_root()
1321 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_expand_inline_ref_root()
1343 ocfs2_journal_dirty(handle, new_bh); in ocfs2_expand_inline_ref_root()
1355 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_expand_inline_ref_root()
1520 static int ocfs2_new_leaf_refcount_block(handle_t *handle, in ocfs2_new_leaf_refcount_block() argument
1539 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_new_leaf_refcount_block()
1546 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_new_leaf_refcount_block()
1553 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_new_leaf_refcount_block()
1569 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_new_leaf_refcount_block()
1597 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_new_leaf_refcount_block()
1598 ocfs2_journal_dirty(handle, new_bh); in ocfs2_new_leaf_refcount_block()
1606 ret = ocfs2_insert_extent(handle, &ref_et, new_cpos, new_bh->b_blocknr, in ocfs2_new_leaf_refcount_block()
1616 static int ocfs2_expand_refcount_tree(handle_t *handle, in ocfs2_expand_refcount_tree() argument
1630 ret = ocfs2_expand_inline_ref_root(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1643 ret = ocfs2_new_leaf_refcount_block(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1658 static int ocfs2_adjust_refcount_rec(handle_t *handle, in ocfs2_adjust_refcount_rec() argument
1700 ret = ocfs2_extend_trans(handle, 2); in ocfs2_adjust_refcount_rec()
1706 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_adjust_refcount_rec()
1713 ret = ocfs2_journal_access_eb(handle, ci, path_leaf_bh(path), in ocfs2_adjust_refcount_rec()
1734 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_adjust_refcount_rec()
1735 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_adjust_refcount_rec()
1742 static int ocfs2_insert_refcount_rec(handle_t *handle, in ocfs2_insert_refcount_rec() argument
1762 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_insert_refcount_rec()
1782 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_insert_refcount_rec()
1807 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_insert_refcount_rec()
1810 ret = ocfs2_adjust_refcount_rec(handle, ci, in ocfs2_insert_refcount_rec()
1830 static int ocfs2_split_refcount_rec(handle_t *handle, in ocfs2_split_refcount_rec() argument
1888 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_split_refcount_rec()
1913 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_split_refcount_rec()
1979 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_split_refcount_rec()
1986 static int __ocfs2_increase_refcount(handle_t *handle, in __ocfs2_increase_refcount() argument
2028 ret = ocfs2_change_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2041 ret = ocfs2_insert_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_increase_refcount()
2059 ret = ocfs2_split_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2080 static int ocfs2_remove_refcount_extent(handle_t *handle, in ocfs2_remove_refcount_extent() argument
2101 ret = ocfs2_remove_extent(handle, &et, le32_to_cpu(rb->rf_cpos), in ocfs2_remove_refcount_extent()
2124 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_remove_refcount_extent()
2154 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_remove_refcount_extent()
2160 int ocfs2_increase_refcount(handle_t *handle, in ocfs2_increase_refcount() argument
2167 return __ocfs2_increase_refcount(handle, ci, ref_root_bh, in ocfs2_increase_refcount()
2172 static int ocfs2_decrease_refcount_rec(handle_t *handle, in ocfs2_decrease_refcount_rec() argument
2195 ret = ocfs2_change_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2204 ret = ocfs2_split_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2217 ret = ocfs2_remove_refcount_extent(handle, ci, ref_root_bh, in ocfs2_decrease_refcount_rec()
2228 static int __ocfs2_decrease_refcount(handle_t *handle, in __ocfs2_decrease_refcount() argument
2263 ret = ocfs2_decrease_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_decrease_refcount()
2295 handle_t *handle, u32 cpos, u32 len, in ocfs2_decrease_refcount() argument
2327 ret = __ocfs2_decrease_refcount(handle, &tree->rf_ci, ref_root_bh, in ocfs2_decrease_refcount()
2347 handle_t *handle, u32 cpos, in ocfs2_mark_extent_refcounted() argument
2363 ret = ocfs2_change_extent_flag(handle, et, cpos, in ocfs2_mark_extent_refcounted()
2904 static int ocfs2_clear_cow_buffer(handle_t *handle, struct buffer_head *bh) in ocfs2_clear_cow_buffer() argument
2913 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()
3694 handle_t *handle; in ocfs2_add_refcount_flag() local
3722 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcount_flag()
3723 if (IS_ERR(handle)) { in ocfs2_add_refcount_flag()
3724 ret = PTR_ERR(handle); in ocfs2_add_refcount_flag()
3729 ret = ocfs2_mark_extent_refcounted(inode, data_et, handle, in ocfs2_add_refcount_flag()
3737 ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcount_flag()
3746 ret = post->func(inode, handle, post->para); in ocfs2_add_refcount_flag()
3752 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcount_flag()
3763 handle_t *handle; in ocfs2_change_ctime() local
3766 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_change_ctime()
3768 if (IS_ERR(handle)) { in ocfs2_change_ctime()
3769 ret = PTR_ERR(handle); in ocfs2_change_ctime()
3774 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_change_ctime()
3785 ocfs2_journal_dirty(handle, di_bh); in ocfs2_change_ctime()
3788 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_change_ctime()
3904 handle_t *handle; in ocfs2_add_refcounted_extent() local
3919 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcounted_extent()
3920 if (IS_ERR(handle)) { in ocfs2_add_refcounted_extent()
3921 ret = PTR_ERR(handle); in ocfs2_add_refcounted_extent()
3926 ret = ocfs2_insert_extent(handle, et, cpos, in ocfs2_add_refcounted_extent()
3934 ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcounted_extent()
3941 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcounted_extent()
3954 handle_t *handle; in ocfs2_duplicate_inline_data() local
3961 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_duplicate_inline_data()
3962 if (IS_ERR(handle)) { in ocfs2_duplicate_inline_data()
3963 ret = PTR_ERR(handle); in ocfs2_duplicate_inline_data()
3968 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_duplicate_inline_data()
3983 ocfs2_journal_dirty(handle, t_bh); in ocfs2_duplicate_inline_data()
3986 ocfs2_commit_trans(osb, handle); in ocfs2_duplicate_inline_data()
4050 handle_t *handle; in ocfs2_complete_reflink() local
4055 handle = ocfs2_start_trans(OCFS2_SB(t_inode->i_sb), in ocfs2_complete_reflink()
4057 if (IS_ERR(handle)) { in ocfs2_complete_reflink()
4058 ret = PTR_ERR(handle); in ocfs2_complete_reflink()
4063 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_complete_reflink()
4107 ocfs2_journal_dirty(handle, t_bh); in ocfs2_complete_reflink()
4110 ocfs2_commit_trans(OCFS2_SB(t_inode->i_sb), handle); in ocfs2_complete_reflink()