Lines Matching refs:handle
60 int (*cow_duplicate_clusters)(handle_t *handle,
554 handle_t *handle = NULL; in ocfs2_create_refcount_tree() local
577 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_CREATE_CREDITS); in ocfs2_create_refcount_tree()
578 if (IS_ERR(handle)) { in ocfs2_create_refcount_tree()
579 ret = PTR_ERR(handle); in ocfs2_create_refcount_tree()
584 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_create_refcount_tree()
591 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_create_refcount_tree()
614 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree()
637 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree()
647 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree()
676 ocfs2_commit_trans(osb, handle); in ocfs2_create_refcount_tree()
696 handle_t *handle = NULL; in ocfs2_set_refcount_tree() local
713 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_SET_CREDITS); in ocfs2_set_refcount_tree()
714 if (IS_ERR(handle)) { in ocfs2_set_refcount_tree()
715 ret = PTR_ERR(handle); in ocfs2_set_refcount_tree()
720 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_set_refcount_tree()
727 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, ref_root_bh, in ocfs2_set_refcount_tree()
737 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_set_refcount_tree()
744 ocfs2_journal_dirty(handle, di_bh); in ocfs2_set_refcount_tree()
747 ocfs2_commit_trans(osb, handle); in ocfs2_set_refcount_tree()
758 handle_t *handle = NULL; in ocfs2_remove_refcount_tree() local
814 handle = ocfs2_start_trans(osb, credits); in ocfs2_remove_refcount_tree()
815 if (IS_ERR(handle)) { in ocfs2_remove_refcount_tree()
816 ret = PTR_ERR(handle); in ocfs2_remove_refcount_tree()
821 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_remove_refcount_tree()
828 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, blk_bh, in ocfs2_remove_refcount_tree()
840 ocfs2_journal_dirty(handle, di_bh); in ocfs2_remove_refcount_tree()
843 ocfs2_journal_dirty(handle, blk_bh); in ocfs2_remove_refcount_tree()
848 ret = ocfs2_free_suballoc_bits(handle, alloc_inode, in ocfs2_remove_refcount_tree()
855 ocfs2_commit_trans(osb, handle); in ocfs2_remove_refcount_tree()
1234 static int ocfs2_change_refcount_rec(handle_t *handle, in ocfs2_change_refcount_rec() argument
1245 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_change_refcount_rec()
1270 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_change_refcount_rec()
1275 static int ocfs2_expand_inline_ref_root(handle_t *handle, in ocfs2_expand_inline_ref_root() argument
1291 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_expand_inline_ref_root()
1298 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_expand_inline_ref_root()
1314 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_expand_inline_ref_root()
1336 ocfs2_journal_dirty(handle, new_bh); in ocfs2_expand_inline_ref_root()
1348 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_expand_inline_ref_root()
1506 static int ocfs2_new_leaf_refcount_block(handle_t *handle, in ocfs2_new_leaf_refcount_block() argument
1525 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_new_leaf_refcount_block()
1532 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_new_leaf_refcount_block()
1539 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_new_leaf_refcount_block()
1555 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_new_leaf_refcount_block()
1583 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_new_leaf_refcount_block()
1584 ocfs2_journal_dirty(handle, new_bh); in ocfs2_new_leaf_refcount_block()
1592 ret = ocfs2_insert_extent(handle, &ref_et, new_cpos, new_bh->b_blocknr, in ocfs2_new_leaf_refcount_block()
1602 static int ocfs2_expand_refcount_tree(handle_t *handle, in ocfs2_expand_refcount_tree() argument
1616 ret = ocfs2_expand_inline_ref_root(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1629 ret = ocfs2_new_leaf_refcount_block(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1644 static int ocfs2_adjust_refcount_rec(handle_t *handle, in ocfs2_adjust_refcount_rec() argument
1686 ret = ocfs2_extend_trans(handle, 2); in ocfs2_adjust_refcount_rec()
1692 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_adjust_refcount_rec()
1699 ret = ocfs2_journal_access_eb(handle, ci, path_leaf_bh(path), in ocfs2_adjust_refcount_rec()
1720 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_adjust_refcount_rec()
1721 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_adjust_refcount_rec()
1728 static int ocfs2_insert_refcount_rec(handle_t *handle, in ocfs2_insert_refcount_rec() argument
1748 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_insert_refcount_rec()
1768 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_insert_refcount_rec()
1793 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_insert_refcount_rec()
1796 ret = ocfs2_adjust_refcount_rec(handle, ci, in ocfs2_insert_refcount_rec()
1816 static int ocfs2_split_refcount_rec(handle_t *handle, in ocfs2_split_refcount_rec() argument
1874 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_split_refcount_rec()
1899 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_split_refcount_rec()
1965 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_split_refcount_rec()
1972 static int __ocfs2_increase_refcount(handle_t *handle, in __ocfs2_increase_refcount() argument
2014 ret = ocfs2_change_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2027 ret = ocfs2_insert_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_increase_refcount()
2045 ret = ocfs2_split_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2066 static int ocfs2_remove_refcount_extent(handle_t *handle, in ocfs2_remove_refcount_extent() argument
2087 ret = ocfs2_remove_extent(handle, &et, le32_to_cpu(rb->rf_cpos), in ocfs2_remove_refcount_extent()
2110 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_remove_refcount_extent()
2140 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_remove_refcount_extent()
2146 int ocfs2_increase_refcount(handle_t *handle, in ocfs2_increase_refcount() argument
2153 return __ocfs2_increase_refcount(handle, ci, ref_root_bh, in ocfs2_increase_refcount()
2158 static int ocfs2_decrease_refcount_rec(handle_t *handle, in ocfs2_decrease_refcount_rec() argument
2181 ret = ocfs2_change_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2190 ret = ocfs2_split_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2203 ret = ocfs2_remove_refcount_extent(handle, ci, ref_root_bh, in ocfs2_decrease_refcount_rec()
2214 static int __ocfs2_decrease_refcount(handle_t *handle, in __ocfs2_decrease_refcount() argument
2249 ret = ocfs2_decrease_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_decrease_refcount()
2281 handle_t *handle, u32 cpos, u32 len, in ocfs2_decrease_refcount() argument
2312 ret = __ocfs2_decrease_refcount(handle, &tree->rf_ci, ref_root_bh, in ocfs2_decrease_refcount()
2332 handle_t *handle, u32 cpos, in ocfs2_mark_extent_refcounted() argument
2348 ret = ocfs2_change_extent_flag(handle, et, cpos, in ocfs2_mark_extent_refcounted()
2888 static int ocfs2_clear_cow_buffer(handle_t *handle, struct buffer_head *bh) in ocfs2_clear_cow_buffer() argument
2897 int ocfs2_duplicate_clusters_by_page(handle_t *handle, in ocfs2_duplicate_clusters_by_page() argument
2969 ret = walk_page_buffers(handle, folio_buffers(folio), in ocfs2_duplicate_clusters_by_page()
2978 ocfs2_map_and_dirty_folio(inode, handle, from, to, in ocfs2_duplicate_clusters_by_page()
2992 int ocfs2_duplicate_clusters_by_jbd(handle_t *handle, in ocfs2_duplicate_clusters_by_jbd() argument
3026 ret = ocfs2_journal_access(handle, ci, new_bh, in ocfs2_duplicate_clusters_by_jbd()
3034 ocfs2_journal_dirty(handle, new_bh); in ocfs2_duplicate_clusters_by_jbd()
3047 static int ocfs2_clear_ext_refcount(handle_t *handle, in ocfs2_clear_ext_refcount() argument
3095 ret = ocfs2_split_extent(handle, et, path, index, in ocfs2_clear_ext_refcount()
3105 static int ocfs2_replace_clusters(handle_t *handle, in ocfs2_replace_clusters() argument
3120 ret = context->cow_duplicate_clusters(handle, context->inode, in ocfs2_replace_clusters()
3128 ret = ocfs2_clear_ext_refcount(handle, &context->data_et, in ocfs2_replace_clusters()
3175 handle_t *handle; in ocfs2_make_clusters_writable() local
3198 handle = ocfs2_start_trans(osb, credits); in ocfs2_make_clusters_writable()
3199 if (IS_ERR(handle)) { in ocfs2_make_clusters_writable()
3200 ret = PTR_ERR(handle); in ocfs2_make_clusters_writable()
3230 ret = ocfs2_clear_ext_refcount(handle, in ocfs2_make_clusters_writable()
3243 ret = __ocfs2_claim_clusters(handle, in ocfs2_make_clusters_writable()
3252 ret = ocfs2_replace_clusters(handle, context, in ocfs2_make_clusters_writable()
3262 ret = __ocfs2_decrease_refcount(handle, ref_ci, in ocfs2_make_clusters_writable()
3281 ret = context->post_refcount->func(context->inode, handle, in ocfs2_make_clusters_writable()
3301 ocfs2_commit_trans(osb, handle); in ocfs2_make_clusters_writable()
3654 handle_t *handle; in ocfs2_add_refcount_flag() local
3685 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcount_flag()
3686 if (IS_ERR(handle)) { in ocfs2_add_refcount_flag()
3687 ret = PTR_ERR(handle); in ocfs2_add_refcount_flag()
3692 ret = ocfs2_mark_extent_refcounted(inode, data_et, handle, in ocfs2_add_refcount_flag()
3700 ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcount_flag()
3709 ret = post->func(inode, handle, post->para); in ocfs2_add_refcount_flag()
3715 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcount_flag()
3726 handle_t *handle; in ocfs2_change_ctime() local
3729 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_change_ctime()
3731 if (IS_ERR(handle)) { in ocfs2_change_ctime()
3732 ret = PTR_ERR(handle); in ocfs2_change_ctime()
3737 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_change_ctime()
3748 ocfs2_journal_dirty(handle, di_bh); in ocfs2_change_ctime()
3751 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_change_ctime()
3867 handle_t *handle; in ocfs2_add_refcounted_extent() local
3882 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcounted_extent()
3883 if (IS_ERR(handle)) { in ocfs2_add_refcounted_extent()
3884 ret = PTR_ERR(handle); in ocfs2_add_refcounted_extent()
3889 ret = ocfs2_insert_extent(handle, et, cpos, in ocfs2_add_refcounted_extent()
3897 ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcounted_extent()
3911 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcounted_extent()
3924 handle_t *handle; in ocfs2_duplicate_inline_data() local
3931 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_duplicate_inline_data()
3932 if (IS_ERR(handle)) { in ocfs2_duplicate_inline_data()
3933 ret = PTR_ERR(handle); in ocfs2_duplicate_inline_data()
3938 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_duplicate_inline_data()
3953 ocfs2_journal_dirty(handle, t_bh); in ocfs2_duplicate_inline_data()
3956 ocfs2_commit_trans(osb, handle); in ocfs2_duplicate_inline_data()
4020 handle_t *handle; in ocfs2_complete_reflink() local
4025 handle = ocfs2_start_trans(OCFS2_SB(t_inode->i_sb), in ocfs2_complete_reflink()
4027 if (IS_ERR(handle)) { in ocfs2_complete_reflink()
4028 ret = PTR_ERR(handle); in ocfs2_complete_reflink()
4033 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_complete_reflink()
4077 ocfs2_journal_dirty(handle, t_bh); in ocfs2_complete_reflink()
4080 ocfs2_commit_trans(OCFS2_SB(t_inode->i_sb), handle); in ocfs2_complete_reflink()
4450 handle_t *handle; in ocfs2_reflink_update_dest() local
4458 handle = ocfs2_start_trans(OCFS2_SB(dest->i_sb), in ocfs2_reflink_update_dest()
4460 if (IS_ERR(handle)) { in ocfs2_reflink_update_dest()
4461 ret = PTR_ERR(handle); in ocfs2_reflink_update_dest()
4473 ret = ocfs2_mark_inode_dirty(handle, dest, d_bh); in ocfs2_reflink_update_dest()
4480 ocfs2_commit_trans(OCFS2_SB(dest->i_sb), handle); in ocfs2_reflink_update_dest()