• Home
  • Raw
  • Download

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()
618 ret = ocfs2_journal_access_rb(handle, &new_tree->rf_ci, new_bh, in ocfs2_create_refcount_tree()
641 ocfs2_journal_dirty(handle, new_bh); in ocfs2_create_refcount_tree()
651 ocfs2_journal_dirty(handle, di_bh); in ocfs2_create_refcount_tree()
680 ocfs2_commit_trans(osb, handle); in ocfs2_create_refcount_tree()
700 handle_t *handle = NULL; in ocfs2_set_refcount_tree() local
717 handle = ocfs2_start_trans(osb, OCFS2_REFCOUNT_TREE_SET_CREDITS); in ocfs2_set_refcount_tree()
718 if (IS_ERR(handle)) { in ocfs2_set_refcount_tree()
719 ret = PTR_ERR(handle); in ocfs2_set_refcount_tree()
724 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_set_refcount_tree()
731 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, ref_root_bh, in ocfs2_set_refcount_tree()
741 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_set_refcount_tree()
748 ocfs2_journal_dirty(handle, di_bh); in ocfs2_set_refcount_tree()
751 ocfs2_commit_trans(osb, handle); in ocfs2_set_refcount_tree()
762 handle_t *handle = NULL; in ocfs2_remove_refcount_tree() local
818 handle = ocfs2_start_trans(osb, credits); in ocfs2_remove_refcount_tree()
819 if (IS_ERR(handle)) { in ocfs2_remove_refcount_tree()
820 ret = PTR_ERR(handle); in ocfs2_remove_refcount_tree()
825 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_remove_refcount_tree()
832 ret = ocfs2_journal_access_rb(handle, &ref_tree->rf_ci, blk_bh, in ocfs2_remove_refcount_tree()
844 ocfs2_journal_dirty(handle, di_bh); in ocfs2_remove_refcount_tree()
847 ocfs2_journal_dirty(handle, blk_bh); in ocfs2_remove_refcount_tree()
852 ret = ocfs2_free_suballoc_bits(handle, alloc_inode, in ocfs2_remove_refcount_tree()
859 ocfs2_commit_trans(osb, handle); in ocfs2_remove_refcount_tree()
1240 static int ocfs2_change_refcount_rec(handle_t *handle, in ocfs2_change_refcount_rec() argument
1251 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_change_refcount_rec()
1276 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_change_refcount_rec()
1281 static int ocfs2_expand_inline_ref_root(handle_t *handle, in ocfs2_expand_inline_ref_root() argument
1297 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_expand_inline_ref_root()
1304 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_expand_inline_ref_root()
1320 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_expand_inline_ref_root()
1342 ocfs2_journal_dirty(handle, new_bh); in ocfs2_expand_inline_ref_root()
1354 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_expand_inline_ref_root()
1522 static int ocfs2_new_leaf_refcount_block(handle_t *handle, in ocfs2_new_leaf_refcount_block() argument
1541 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_new_leaf_refcount_block()
1548 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_new_leaf_refcount_block()
1555 ret = ocfs2_claim_metadata(handle, meta_ac, 1, &suballoc_loc, in ocfs2_new_leaf_refcount_block()
1571 ret = ocfs2_journal_access_rb(handle, ci, new_bh, in ocfs2_new_leaf_refcount_block()
1599 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_new_leaf_refcount_block()
1600 ocfs2_journal_dirty(handle, new_bh); in ocfs2_new_leaf_refcount_block()
1608 ret = ocfs2_insert_extent(handle, &ref_et, new_cpos, new_bh->b_blocknr, in ocfs2_new_leaf_refcount_block()
1618 static int ocfs2_expand_refcount_tree(handle_t *handle, in ocfs2_expand_refcount_tree() argument
1632 ret = ocfs2_expand_inline_ref_root(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1645 ret = ocfs2_new_leaf_refcount_block(handle, ci, ref_root_bh, in ocfs2_expand_refcount_tree()
1660 static int ocfs2_adjust_refcount_rec(handle_t *handle, in ocfs2_adjust_refcount_rec() argument
1702 ret = ocfs2_extend_trans(handle, 2); in ocfs2_adjust_refcount_rec()
1708 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_adjust_refcount_rec()
1715 ret = ocfs2_journal_access_eb(handle, ci, path_leaf_bh(path), in ocfs2_adjust_refcount_rec()
1736 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_adjust_refcount_rec()
1737 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_adjust_refcount_rec()
1744 static int ocfs2_insert_refcount_rec(handle_t *handle, in ocfs2_insert_refcount_rec() argument
1764 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_insert_refcount_rec()
1784 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_insert_refcount_rec()
1809 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_insert_refcount_rec()
1812 ret = ocfs2_adjust_refcount_rec(handle, ci, in ocfs2_insert_refcount_rec()
1832 static int ocfs2_split_refcount_rec(handle_t *handle, in ocfs2_split_refcount_rec() argument
1890 ret = ocfs2_expand_refcount_tree(handle, ci, ref_root_bh, in ocfs2_split_refcount_rec()
1915 ret = ocfs2_journal_access_rb(handle, ci, ref_leaf_bh, in ocfs2_split_refcount_rec()
1981 ocfs2_journal_dirty(handle, ref_leaf_bh); in ocfs2_split_refcount_rec()
1988 static int __ocfs2_increase_refcount(handle_t *handle, in __ocfs2_increase_refcount() argument
2030 ret = ocfs2_change_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2043 ret = ocfs2_insert_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_increase_refcount()
2061 ret = ocfs2_split_refcount_rec(handle, ci, in __ocfs2_increase_refcount()
2082 static int ocfs2_remove_refcount_extent(handle_t *handle, in ocfs2_remove_refcount_extent() argument
2103 ret = ocfs2_remove_extent(handle, &et, le32_to_cpu(rb->rf_cpos), in ocfs2_remove_refcount_extent()
2126 ret = ocfs2_journal_access_rb(handle, ci, ref_root_bh, in ocfs2_remove_refcount_extent()
2156 ocfs2_journal_dirty(handle, ref_root_bh); in ocfs2_remove_refcount_extent()
2162 int ocfs2_increase_refcount(handle_t *handle, in ocfs2_increase_refcount() argument
2169 return __ocfs2_increase_refcount(handle, ci, ref_root_bh, in ocfs2_increase_refcount()
2174 static int ocfs2_decrease_refcount_rec(handle_t *handle, in ocfs2_decrease_refcount_rec() argument
2197 ret = ocfs2_change_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2206 ret = ocfs2_split_refcount_rec(handle, ci, in ocfs2_decrease_refcount_rec()
2219 ret = ocfs2_remove_refcount_extent(handle, ci, ref_root_bh, in ocfs2_decrease_refcount_rec()
2230 static int __ocfs2_decrease_refcount(handle_t *handle, in __ocfs2_decrease_refcount() argument
2265 ret = ocfs2_decrease_refcount_rec(handle, ci, ref_root_bh, in __ocfs2_decrease_refcount()
2297 handle_t *handle, u32 cpos, u32 len, in ocfs2_decrease_refcount() argument
2329 ret = __ocfs2_decrease_refcount(handle, &tree->rf_ci, ref_root_bh, in ocfs2_decrease_refcount()
2349 handle_t *handle, u32 cpos, in ocfs2_mark_extent_refcounted() argument
2367 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
2993 ret = walk_page_buffers(handle, page_buffers(page), in ocfs2_duplicate_clusters_by_page()
3002 ocfs2_map_and_dirty_page(inode, handle, from, to, in ocfs2_duplicate_clusters_by_page()
3017 int ocfs2_duplicate_clusters_by_jbd(handle_t *handle, in ocfs2_duplicate_clusters_by_jbd() argument
3052 ret = ocfs2_journal_access(handle, ci, new_bh, in ocfs2_duplicate_clusters_by_jbd()
3060 ocfs2_journal_dirty(handle, new_bh); in ocfs2_duplicate_clusters_by_jbd()
3073 static int ocfs2_clear_ext_refcount(handle_t *handle, in ocfs2_clear_ext_refcount() argument
3123 ret = ocfs2_split_extent(handle, et, path, index, in ocfs2_clear_ext_refcount()
3133 static int ocfs2_replace_clusters(handle_t *handle, in ocfs2_replace_clusters() argument
3148 ret = context->cow_duplicate_clusters(handle, context->file, in ocfs2_replace_clusters()
3156 ret = ocfs2_clear_ext_refcount(handle, &context->data_et, in ocfs2_replace_clusters()
3233 handle_t *handle; in ocfs2_make_clusters_writable() local
3256 handle = ocfs2_start_trans(osb, credits); in ocfs2_make_clusters_writable()
3257 if (IS_ERR(handle)) { in ocfs2_make_clusters_writable()
3258 ret = PTR_ERR(handle); in ocfs2_make_clusters_writable()
3288 ret = ocfs2_clear_ext_refcount(handle, in ocfs2_make_clusters_writable()
3301 ret = __ocfs2_claim_clusters(handle, in ocfs2_make_clusters_writable()
3310 ret = ocfs2_replace_clusters(handle, context, in ocfs2_make_clusters_writable()
3320 ret = __ocfs2_decrease_refcount(handle, ref_ci, in ocfs2_make_clusters_writable()
3339 ret = context->post_refcount->func(context->inode, handle, in ocfs2_make_clusters_writable()
3359 ocfs2_commit_trans(osb, handle); in ocfs2_make_clusters_writable()
3744 handle_t *handle; in ocfs2_add_refcount_flag() local
3772 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcount_flag()
3773 if (IS_ERR(handle)) { in ocfs2_add_refcount_flag()
3774 ret = PTR_ERR(handle); in ocfs2_add_refcount_flag()
3779 ret = ocfs2_mark_extent_refcounted(inode, data_et, handle, in ocfs2_add_refcount_flag()
3787 ret = __ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcount_flag()
3796 ret = post->func(inode, handle, post->para); in ocfs2_add_refcount_flag()
3802 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcount_flag()
3813 handle_t *handle; in ocfs2_change_ctime() local
3816 handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), in ocfs2_change_ctime()
3818 if (IS_ERR(handle)) { in ocfs2_change_ctime()
3819 ret = PTR_ERR(handle); in ocfs2_change_ctime()
3824 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_change_ctime()
3835 ocfs2_journal_dirty(handle, di_bh); in ocfs2_change_ctime()
3838 ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); in ocfs2_change_ctime()
3951 handle_t *handle; in ocfs2_add_refcounted_extent() local
3966 handle = ocfs2_start_trans(osb, credits); in ocfs2_add_refcounted_extent()
3967 if (IS_ERR(handle)) { in ocfs2_add_refcounted_extent()
3968 ret = PTR_ERR(handle); in ocfs2_add_refcounted_extent()
3973 ret = ocfs2_insert_extent(handle, et, cpos, in ocfs2_add_refcounted_extent()
3981 ret = ocfs2_increase_refcount(handle, ref_ci, ref_root_bh, in ocfs2_add_refcounted_extent()
3988 ocfs2_commit_trans(osb, handle); in ocfs2_add_refcounted_extent()
4001 handle_t *handle; in ocfs2_duplicate_inline_data() local
4008 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_duplicate_inline_data()
4009 if (IS_ERR(handle)) { in ocfs2_duplicate_inline_data()
4010 ret = PTR_ERR(handle); in ocfs2_duplicate_inline_data()
4015 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_duplicate_inline_data()
4030 ocfs2_journal_dirty(handle, t_bh); in ocfs2_duplicate_inline_data()
4033 ocfs2_commit_trans(osb, handle); in ocfs2_duplicate_inline_data()
4094 handle_t *handle; in ocfs2_complete_reflink() local
4099 handle = ocfs2_start_trans(OCFS2_SB(t_inode->i_sb), in ocfs2_complete_reflink()
4101 if (IS_ERR(handle)) { in ocfs2_complete_reflink()
4102 ret = PTR_ERR(handle); in ocfs2_complete_reflink()
4107 ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, in ocfs2_complete_reflink()
4151 ocfs2_journal_dirty(handle, t_bh); in ocfs2_complete_reflink()
4154 ocfs2_commit_trans(OCFS2_SB(t_inode->i_sb), handle); in ocfs2_complete_reflink()