Lines Matching refs:handle
68 int (*cow_duplicate_clusters)(handle_t *handle,
563 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local
586 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree()
587 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree()
588 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree()
593 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree()
600 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree()
623 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree()
646 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree()
656 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree()
685 ocfs2_commit_trans(osb, handle); in ocfs2_create_refcount_tree()
705 handle_t *handle = NULL; in ocfs2_set_refcount_tree() local
722 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_SET_CREDITS); in ocfs2_set_refcount_tree()
723 if (IS_ERR(handle)) { in ocfs2_set_refcount_tree()
724 ret = PTR_ERR(handle); in ocfs2_set_refcount_tree()
729 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_set_refcount_tree()
736 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, ref_root_bh, in ocfs2_set_refcount_tree()
746 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_set_refcount_tree()
753 ocfs2_journal_dirty(handle, di_bh); in ocfs2_set_refcount_tree()
756 ocfs2_commit_trans(osb, handle); in ocfs2_set_refcount_tree()
767 handle_t *handle = NULL; in ocfs2_remove_refcount_tree() local
823 handle = ocfs2_start_trans(osb, credits); in ocfs2_remove_refcount_tree()
824 if (IS_ERR(handle)) { in ocfs2_remove_refcount_tree()
825 ret = PTR_ERR(handle); in ocfs2_remove_refcount_tree()
830 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_remove_refcount_tree()
837 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, blk_bh, in ocfs2_remove_refcount_tree()
849 ocfs2_journal_dirty(handle, di_bh); in ocfs2_remove_refcount_tree()
852 ocfs2_journal_dirty(handle, blk_bh); in ocfs2_remove_refcount_tree()
857 ret = ocfs2_free_suballoc_bits(handle, alloc_inode, in ocfs2_remove_refcount_tree()
864 ocfs2_commit_trans(osb, handle); in ocfs2_remove_refcount_tree()
1245 static int ocfs2_change_refcount_rec(handle_t *handle, in ocfs2_change_refcount_rec() argument
1256 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_change_refcount_rec()
1281 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_change_refcount_rec()
1286 static int ocfs2_expand_inline_ref_root(handle_t *handle, in ocfs2_expand_inline_ref_root() argument
1302 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_expand_inline_ref_root()
1309 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_expand_inline_ref_root()
1325 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_expand_inline_ref_root()
1347 ocfs2_journal_dirty(handle, new_bh); in ocfs2_expand_inline_ref_root()
1359 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_expand_inline_ref_root()
1526 static int ocfs2_new_leaf_refcount_block(handle_t *handle, in ocfs2_new_leaf_refcount_block() argument
1545 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_new_leaf_refcount_block()
1552 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_new_leaf_refcount_block()
1559 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_new_leaf_refcount_block()
1575 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_new_leaf_refcount_block()
1603 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_new_leaf_refcount_block()
1604 ocfs2_journal_dirty(handle, new_bh); in ocfs2_new_leaf_refcount_block()
1612 ret = ocfs2_insert_extent(handle, &ref_et, new_cpos, new_bh->b_blocknr, in ocfs2_new_leaf_refcount_block()
1622 static int ocfs2_expand_refcount_tree(handle_t *handle, in ocfs2_expand_refcount_tree() argument
1636 ret = ocfs2_expand_inline_ref_root(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1649 ret = ocfs2_new_leaf_refcount_block(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1664 static int ocfs2_adjust_refcount_rec(handle_t *handle, in ocfs2_adjust_refcount_rec() argument
1706 ret = ocfs2_extend_trans(handle, 2); in ocfs2_adjust_refcount_rec()
1712 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_adjust_refcount_rec()
1719 ret = ocfs2_journal_access_eb(handle, ci, path_leaf_bh(path), in ocfs2_adjust_refcount_rec()
1740 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_adjust_refcount_rec()
1741 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_adjust_refcount_rec()
1748 static int ocfs2_insert_refcount_rec(handle_t *handle, in ocfs2_insert_refcount_rec() argument
1768 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_insert_refcount_rec()
1788 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_insert_refcount_rec()
1813 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_insert_refcount_rec()
1816 ret = ocfs2_adjust_refcount_rec(handle, ci, in ocfs2_insert_refcount_rec()
1836 static int ocfs2_split_refcount_rec(handle_t *handle, in ocfs2_split_refcount_rec() argument
1894 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_split_refcount_rec()
1919 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_split_refcount_rec()
1985 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_split_refcount_rec()
1992 static int __ocfs2_increase_refcount(handle_t *handle, in __ocfs2_increase_refcount() argument
2034 ret = ocfs2_change_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2047 ret = ocfs2_insert_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_increase_refcount()
2065 ret = ocfs2_split_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2086 static int ocfs2_remove_refcount_extent(handle_t *handle, in ocfs2_remove_refcount_extent() argument
2107 ret = ocfs2_remove_extent(handle, &et, le32_to_cpu(rb->rf_cpos), in ocfs2_remove_refcount_extent()
2130 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_remove_refcount_extent()
2160 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_remove_refcount_extent()
2166 int ocfs2_increase_refcount(handle_t *handle, in ocfs2_increase_refcount() argument
2173 return __ocfs2_increase_refcount(handle, ci, ref_root_bh, in ocfs2_increase_refcount()
2178 static int ocfs2_decrease_refcount_rec(handle_t *handle, in ocfs2_decrease_refcount_rec() argument
2201 ret = ocfs2_change_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2210 ret = ocfs2_split_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2223 ret = ocfs2_remove_refcount_extent(handle, ci, ref_root_bh, in ocfs2_decrease_refcount_rec()
2234 static int __ocfs2_decrease_refcount(handle_t *handle, in __ocfs2_decrease_refcount() argument
2269 ret = ocfs2_decrease_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_decrease_refcount()
2301 handle_t *handle, u32 cpos, u32 len, in ocfs2_decrease_refcount() argument
2333 ret = __ocfs2_decrease_refcount(handle, &tree->rf_ci, ref_root_bh, in ocfs2_decrease_refcount()
2353 handle_t *handle, u32 cpos, in ocfs2_mark_extent_refcounted() argument
2371 ret = ocfs2_change_extent_flag(handle, et, cpos, in ocfs2_mark_extent_refcounted()
2915 static int ocfs2_clear_cow_buffer(handle_t *handle, struct buffer_head *bh) in ocfs2_clear_cow_buffer() argument
2924 int ocfs2_duplicate_clusters_by_page(handle_t *handle, in ocfs2_duplicate_clusters_by_page() argument
2989 ret = walk_page_buffers(handle, page_buffers(page), in ocfs2_duplicate_clusters_by_page()
2999 handle, from, to, in ocfs2_duplicate_clusters_by_page()
3014 int ocfs2_duplicate_clusters_by_jbd(handle_t *handle, in ocfs2_duplicate_clusters_by_jbd() argument
3048 ret = ocfs2_journal_access(handle, ci, new_bh, in ocfs2_duplicate_clusters_by_jbd()
3056 ocfs2_journal_dirty(handle, new_bh); in ocfs2_duplicate_clusters_by_jbd()
3069 static int ocfs2_clear_ext_refcount(handle_t *handle, in ocfs2_clear_ext_refcount() argument
3119 ret = ocfs2_split_extent(handle, et, path, index, in ocfs2_clear_ext_refcount()
3129 static int ocfs2_replace_clusters(handle_t *handle, in ocfs2_replace_clusters() argument
3144 ret = context->cow_duplicate_clusters(handle, context->inode, in ocfs2_replace_clusters()
3152 ret = ocfs2_clear_ext_refcount(handle, &context->data_et, in ocfs2_replace_clusters()
3229 handle_t *handle; in ocfs2_make_clusters_writable() local
3252 handle = ocfs2_start_trans(osb, credits); in ocfs2_make_clusters_writable()
3253 if (IS_ERR(handle)) { in ocfs2_make_clusters_writable()
3254 ret = PTR_ERR(handle); in ocfs2_make_clusters_writable()
3284 ret = ocfs2_clear_ext_refcount(handle, in ocfs2_make_clusters_writable()
3297 ret = __ocfs2_claim_clusters(handle, in ocfs2_make_clusters_writable()
3306 ret = ocfs2_replace_clusters(handle, context, in ocfs2_make_clusters_writable()
3316 ret = __ocfs2_decrease_refcount(handle, ref_ci, in ocfs2_make_clusters_writable()
3335 ret = context->post_refcount->func(context->inode, handle, in ocfs2_make_clusters_writable()
3355 ocfs2_commit_trans(osb, handle); in ocfs2_make_clusters_writable()
3712 handle_t *handle; in ocfs2_add_refcount_flag() local
3740 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcount_flag()
3741 if (IS_ERR(handle)) { in ocfs2_add_refcount_flag()
3742 ret = PTR_ERR(handle); in ocfs2_add_refcount_flag()
3747 ret = ocfs2_mark_extent_refcounted(inode, data_et, handle, in ocfs2_add_refcount_flag()
3755 ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcount_flag()
3764 ret = post->func(inode, handle, post->para); in ocfs2_add_refcount_flag()
3770 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcount_flag()
3781 handle_t *handle; in ocfs2_change_ctime() local
3784 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_change_ctime()
3786 if (IS_ERR(handle)) { in ocfs2_change_ctime()
3787 ret = PTR_ERR(handle); in ocfs2_change_ctime()
3792 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_change_ctime()
3803 ocfs2_journal_dirty(handle, di_bh); in ocfs2_change_ctime()
3806 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_change_ctime()
3922 handle_t *handle; in ocfs2_add_refcounted_extent() local
3937 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcounted_extent()
3938 if (IS_ERR(handle)) { in ocfs2_add_refcounted_extent()
3939 ret = PTR_ERR(handle); in ocfs2_add_refcounted_extent()
3944 ret = ocfs2_insert_extent(handle, et, cpos, in ocfs2_add_refcounted_extent()
3952 ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcounted_extent()
3959 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcounted_extent()
3972 handle_t *handle; in ocfs2_duplicate_inline_data() local
3979 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_duplicate_inline_data()
3980 if (IS_ERR(handle)) { in ocfs2_duplicate_inline_data()
3981 ret = PTR_ERR(handle); in ocfs2_duplicate_inline_data()
3986 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_duplicate_inline_data()
4001 ocfs2_journal_dirty(handle, t_bh); in ocfs2_duplicate_inline_data()
4004 ocfs2_commit_trans(osb, handle); in ocfs2_duplicate_inline_data()
4068 handle_t *handle; in ocfs2_complete_reflink() local
4073 handle = ocfs2_start_trans(OCFS2_SB(t_inode->i_sb), in ocfs2_complete_reflink()
4075 if (IS_ERR(handle)) { in ocfs2_complete_reflink()
4076 ret = PTR_ERR(handle); in ocfs2_complete_reflink()
4081 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_complete_reflink()
4125 ocfs2_journal_dirty(handle, t_bh); in ocfs2_complete_reflink()
4128 ocfs2_commit_trans(OCFS2_SB(t_inode->i_sb), handle); in ocfs2_complete_reflink()