Lines Matching refs:handle
153 static int ocfs2_reuse_blk_from_dealloc(handle_t *handle,
522 static inline int ocfs2_et_root_journal_access(handle_t *handle, in ocfs2_et_root_journal_access() argument
526 return et->et_root_journal_access(handle, et->et_ci, et->et_root_bh, in ocfs2_et_root_journal_access()
564 static void ocfs2_adjust_rightmost_records(handle_t *handle,
719 int ocfs2_path_bh_journal_access(handle_t *handle, in ocfs2_path_bh_journal_access() argument
732 return access(handle, ci, path->p_node[idx].bh, in ocfs2_path_bh_journal_access()
740 handle_t *handle, in ocfs2_journal_access_path() argument
749 ret = ocfs2_path_bh_journal_access(handle, ci, path, i); in ocfs2_journal_access_path()
992 static int ocfs2_create_new_meta_bhs(handle_t *handle, in ocfs2_create_new_meta_bhs() argument
1008 status = ocfs2_claim_metadata(handle, in ocfs2_create_new_meta_bhs()
1029 status = ocfs2_journal_access_eb(handle, et->et_ci, in ocfs2_create_new_meta_bhs()
1055 ocfs2_journal_dirty(handle, bhs[i]); in ocfs2_create_new_meta_bhs()
1098 static int ocfs2_adjust_rightmost_branch(handle_t *handle, in ocfs2_adjust_rightmost_branch() argument
1118 status = ocfs2_extend_trans(handle, path_num_items(path)); in ocfs2_adjust_rightmost_branch()
1124 status = ocfs2_journal_access_path(et->et_ci, handle, path); in ocfs2_adjust_rightmost_branch()
1133 ocfs2_adjust_rightmost_records(handle, et, path, rec); in ocfs2_adjust_rightmost_branch()
1151 static int ocfs2_add_branch(handle_t *handle, in ocfs2_add_branch() argument
1196 status = ocfs2_adjust_rightmost_branch(handle, et); in ocfs2_add_branch()
1216 status = ocfs2_reuse_blk_from_dealloc(handle, et, in ocfs2_add_branch()
1229 status = ocfs2_create_new_meta_bhs(handle, et, in ocfs2_add_branch()
1254 status = ocfs2_journal_access_eb(handle, et->et_ci, bh, in ocfs2_add_branch()
1279 ocfs2_journal_dirty(handle, bh); in ocfs2_add_branch()
1289 status = ocfs2_journal_access_eb(handle, et->et_ci, *last_eb_bh, in ocfs2_add_branch()
1295 status = ocfs2_et_root_journal_access(handle, et, in ocfs2_add_branch()
1302 status = ocfs2_journal_access_eb(handle, et->et_ci, eb_bh, in ocfs2_add_branch()
1325 ocfs2_journal_dirty(handle, *last_eb_bh); in ocfs2_add_branch()
1326 ocfs2_journal_dirty(handle, et->et_root_bh); in ocfs2_add_branch()
1328 ocfs2_journal_dirty(handle, eb_bh); in ocfs2_add_branch()
1354 static int ocfs2_shift_tree_depth(handle_t *handle, in ocfs2_shift_tree_depth() argument
1367 status = ocfs2_reuse_blk_from_dealloc(handle, et, in ocfs2_shift_tree_depth()
1371 status = ocfs2_create_new_meta_bhs(handle, et, 1, meta_ac, in ocfs2_shift_tree_depth()
1390 status = ocfs2_journal_access_eb(handle, et->et_ci, new_eb_bh, in ocfs2_shift_tree_depth()
1403 ocfs2_journal_dirty(handle, new_eb_bh); in ocfs2_shift_tree_depth()
1405 status = ocfs2_et_root_journal_access(handle, et, in ocfs2_shift_tree_depth()
1428 ocfs2_journal_dirty(handle, et->et_root_bh); in ocfs2_shift_tree_depth()
1529 static int ocfs2_grow_tree(handle_t *handle, struct ocfs2_extent_tree *et, in ocfs2_grow_tree() argument
1560 ret = ocfs2_shift_tree_depth(handle, et, meta_ac, &bh); in ocfs2_grow_tree()
1585 ret = ocfs2_add_branch(handle, et, bh, last_eb_bh, in ocfs2_grow_tree()
2050 static void ocfs2_complete_edge_insert(handle_t *handle, in ocfs2_complete_edge_insert() argument
2092 ocfs2_journal_dirty(handle, left_path->p_node[i].bh); in ocfs2_complete_edge_insert()
2093 ocfs2_journal_dirty(handle, right_path->p_node[i].bh); in ocfs2_complete_edge_insert()
2117 ocfs2_journal_dirty(handle, root_bh); in ocfs2_complete_edge_insert()
2120 static int ocfs2_rotate_subtree_right(handle_t *handle, in ocfs2_rotate_subtree_right() argument
2155 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path, in ocfs2_rotate_subtree_right()
2163 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_rotate_subtree_right()
2170 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_rotate_subtree_right()
2189 ocfs2_journal_dirty(handle, right_leaf_bh); in ocfs2_rotate_subtree_right()
2208 ocfs2_journal_dirty(handle, left_leaf_bh); in ocfs2_rotate_subtree_right()
2210 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_rotate_subtree_right()
2296 static int ocfs2_extend_rotate_transaction(handle_t *handle, int subtree_depth, in ocfs2_extend_rotate_transaction() argument
2303 if (jbd2_handle_buffer_credits(handle) < credits) in ocfs2_extend_rotate_transaction()
2304 ret = ocfs2_extend_trans(handle, in ocfs2_extend_rotate_transaction()
2305 credits - jbd2_handle_buffer_credits(handle)); in ocfs2_extend_rotate_transaction()
2375 static int ocfs2_rotate_tree_right(handle_t *handle, in ocfs2_rotate_tree_right() argument
2382 int ret, start, orig_credits = jbd2_handle_buffer_credits(handle); in ocfs2_rotate_tree_right()
2483 ret = ocfs2_extend_rotate_transaction(handle, start, in ocfs2_rotate_tree_right()
2490 ret = ocfs2_rotate_subtree_right(handle, et, left_path, in ocfs2_rotate_tree_right()
2536 static int ocfs2_update_edge_lengths(handle_t *handle, in ocfs2_update_edge_lengths() argument
2546 ret = ocfs2_journal_access_path(et->et_ci, handle, path); in ocfs2_update_edge_lengths()
2570 ocfs2_journal_dirty(handle, path->p_node[i].bh); in ocfs2_update_edge_lengths()
2576 static void ocfs2_unlink_path(handle_t *handle, in ocfs2_unlink_path() argument
2603 ocfs2_journal_dirty(handle, bh); in ocfs2_unlink_path()
2611 ocfs2_journal_dirty(handle, bh); in ocfs2_unlink_path()
2621 static void ocfs2_unlink_subtree(handle_t *handle, in ocfs2_unlink_subtree() argument
2647 ocfs2_journal_dirty(handle, root_bh); in ocfs2_unlink_subtree()
2648 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_unlink_subtree()
2650 ocfs2_unlink_path(handle, et, dealloc, right_path, in ocfs2_unlink_subtree()
2654 static int ocfs2_rotate_subtree_left(handle_t *handle, in ocfs2_rotate_subtree_left() argument
2696 ret = ocfs2_journal_access_eb(handle, et->et_ci, in ocfs2_rotate_subtree_left()
2715 ret = ocfs2_et_root_journal_access(handle, et, in ocfs2_rotate_subtree_left()
2731 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path, in ocfs2_rotate_subtree_left()
2739 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_rotate_subtree_left()
2746 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_rotate_subtree_left()
2775 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_rotate_subtree_left()
2776 ocfs2_journal_dirty(handle, path_leaf_bh(right_path)); in ocfs2_rotate_subtree_left()
2779 ocfs2_unlink_subtree(handle, et, left_path, right_path, in ocfs2_rotate_subtree_left()
2781 ret = ocfs2_update_edge_lengths(handle, et, left_path); in ocfs2_rotate_subtree_left()
2798 ocfs2_journal_dirty(handle, et_root_bh); in ocfs2_rotate_subtree_left()
2802 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_rotate_subtree_left()
2887 static int ocfs2_rotate_rightmost_leaf_left(handle_t *handle, in ocfs2_rotate_rightmost_leaf_left() argument
2898 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, path, in ocfs2_rotate_rightmost_leaf_left()
2906 ocfs2_journal_dirty(handle, bh); in ocfs2_rotate_rightmost_leaf_left()
2912 static int __ocfs2_rotate_tree_left(handle_t *handle, in __ocfs2_rotate_tree_left() argument
2967 ret = ocfs2_extend_rotate_transaction(handle, 0, in __ocfs2_rotate_tree_left()
2978 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in __ocfs2_rotate_tree_left()
2985 ret = ocfs2_rotate_subtree_left(handle, et, left_path, in __ocfs2_rotate_tree_left()
3029 static int ocfs2_remove_rightmost_path(handle_t *handle, in ocfs2_remove_rightmost_path() argument
3044 ret = ocfs2_journal_access_path(et->et_ci, handle, path); in ocfs2_remove_rightmost_path()
3075 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_remove_rightmost_path()
3083 ocfs2_unlink_subtree(handle, et, left_path, path, in ocfs2_remove_rightmost_path()
3085 ret = ocfs2_update_edge_lengths(handle, et, left_path); in ocfs2_remove_rightmost_path()
3101 ocfs2_unlink_path(handle, et, dealloc, path, 1); in ocfs2_remove_rightmost_path()
3111 ocfs2_journal_dirty(handle, path_root_bh(path)); in ocfs2_remove_rightmost_path()
3123 handle_t *handle; in ocfs2_remove_rightmost_empty_extent() local
3127 handle = ocfs2_start_trans(osb, credits); in ocfs2_remove_rightmost_empty_extent()
3128 if (IS_ERR(handle)) { in ocfs2_remove_rightmost_empty_extent()
3129 ret = PTR_ERR(handle); in ocfs2_remove_rightmost_empty_extent()
3134 ret = ocfs2_remove_rightmost_path(handle, et, path, dealloc); in ocfs2_remove_rightmost_empty_extent()
3138 ocfs2_commit_trans(osb, handle); in ocfs2_remove_rightmost_empty_extent()
3158 static int ocfs2_rotate_tree_left(handle_t *handle, in ocfs2_rotate_tree_left() argument
3163 int ret, orig_credits = jbd2_handle_buffer_credits(handle); in ocfs2_rotate_tree_left()
3178 ret = ocfs2_rotate_rightmost_leaf_left(handle, et, path); in ocfs2_rotate_tree_left()
3225 ret = ocfs2_remove_rightmost_path(handle, et, path, in ocfs2_rotate_tree_left()
3237 ret = __ocfs2_rotate_tree_left(handle, et, orig_credits, path, in ocfs2_rotate_tree_left()
3248 ret = __ocfs2_rotate_tree_left(handle, et, orig_credits, in ocfs2_rotate_tree_left()
3356 handle_t *handle, in ocfs2_merge_rec_right() argument
3400 ret = ocfs2_extend_rotate_transaction(handle, subtree_index, in ocfs2_merge_rec_right()
3401 jbd2_handle_buffer_credits(handle), in ocfs2_merge_rec_right()
3411 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path, in ocfs2_merge_rec_right()
3420 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_merge_rec_right()
3427 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_merge_rec_right()
3440 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, left_path, in ocfs2_merge_rec_right()
3457 ocfs2_journal_dirty(handle, bh); in ocfs2_merge_rec_right()
3459 ocfs2_journal_dirty(handle, path_leaf_bh(right_path)); in ocfs2_merge_rec_right()
3460 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_merge_rec_right()
3522 handle_t *handle, in ocfs2_merge_rec_left() argument
3562 ret = ocfs2_extend_rotate_transaction(handle, subtree_index, in ocfs2_merge_rec_left()
3563 jbd2_handle_buffer_credits(handle), in ocfs2_merge_rec_left()
3573 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path, in ocfs2_merge_rec_left()
3582 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_merge_rec_left()
3589 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, in ocfs2_merge_rec_left()
3602 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, right_path, in ocfs2_merge_rec_left()
3625 ocfs2_journal_dirty(handle, bh); in ocfs2_merge_rec_left()
3627 ocfs2_journal_dirty(handle, path_leaf_bh(left_path)); in ocfs2_merge_rec_left()
3637 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_merge_rec_left()
3638 jbd2_handle_buffer_credits(handle), in ocfs2_merge_rec_left()
3645 ret = ocfs2_remove_rightmost_path(handle, et, in ocfs2_merge_rec_left()
3659 ocfs2_complete_edge_insert(handle, left_path, in ocfs2_merge_rec_left()
3667 static int ocfs2_try_to_merge_extent(handle_t *handle, in ocfs2_try_to_merge_extent() argument
3683 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_try_to_merge_extent()
3684 jbd2_handle_buffer_credits(handle), in ocfs2_try_to_merge_extent()
3697 ret = ocfs2_rotate_tree_left(handle, et, path, dealloc); in ocfs2_try_to_merge_extent()
3726 ret = ocfs2_merge_rec_right(path, handle, et, split_rec, in ocfs2_try_to_merge_extent()
3739 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_try_to_merge_extent()
3740 jbd2_handle_buffer_credits(handle), in ocfs2_try_to_merge_extent()
3748 ret = ocfs2_rotate_tree_left(handle, et, path, dealloc); in ocfs2_try_to_merge_extent()
3760 ret = ocfs2_merge_rec_left(path, handle, et, rec, in ocfs2_try_to_merge_extent()
3769 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_try_to_merge_extent()
3770 jbd2_handle_buffer_credits(handle), in ocfs2_try_to_merge_extent()
3777 ret = ocfs2_rotate_tree_left(handle, et, path, dealloc); in ocfs2_try_to_merge_extent()
3794 ret = ocfs2_merge_rec_left(path, handle, et, in ocfs2_try_to_merge_extent()
3802 ret = ocfs2_merge_rec_right(path, handle, in ocfs2_try_to_merge_extent()
3813 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_try_to_merge_extent()
3814 jbd2_handle_buffer_credits(handle), in ocfs2_try_to_merge_extent()
3826 ret = ocfs2_rotate_tree_left(handle, et, path, in ocfs2_try_to_merge_extent()
3962 static void ocfs2_adjust_rightmost_records(handle_t *handle, in ocfs2_adjust_rightmost_records() argument
3995 ocfs2_journal_dirty(handle, bh); in ocfs2_adjust_rightmost_records()
3999 static int ocfs2_append_rec_to_path(handle_t *handle, in ocfs2_append_rec_to_path() argument
4067 ret = ocfs2_journal_access_path(et->et_ci, handle, right_path); in ocfs2_append_rec_to_path()
4073 ocfs2_adjust_rightmost_records(handle, et, right_path, insert_rec); in ocfs2_append_rec_to_path()
4170 static int ocfs2_insert_path(handle_t *handle, in ocfs2_insert_path() argument
4187 ret = ocfs2_extend_trans(handle, left_path->p_tree_depth); in ocfs2_insert_path()
4193 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_insert_path()
4204 ret = ocfs2_journal_access_path(et->et_ci, handle, right_path); in ocfs2_insert_path()
4225 ocfs2_journal_dirty(handle, in ocfs2_insert_path()
4231 ocfs2_journal_dirty(handle, leaf_bh); in ocfs2_insert_path()
4242 ocfs2_complete_edge_insert(handle, left_path, right_path, in ocfs2_insert_path()
4251 static int ocfs2_do_insert_extent(handle_t *handle, in ocfs2_do_insert_extent() argument
4264 ret = ocfs2_et_root_journal_access(handle, et, in ocfs2_do_insert_extent()
4314 ret = ocfs2_rotate_tree_right(handle, et, type->ins_split, in ocfs2_do_insert_extent()
4326 ret = ocfs2_et_root_journal_access(handle, et, in ocfs2_do_insert_extent()
4334 ret = ocfs2_append_rec_to_path(handle, et, insert_rec, in ocfs2_do_insert_extent()
4342 ret = ocfs2_insert_path(handle, et, left_path, right_path, in ocfs2_do_insert_extent()
4354 ocfs2_journal_dirty(handle, et->et_root_bh); in ocfs2_do_insert_extent()
4714 int ocfs2_insert_extent(handle_t *handle, in ocfs2_insert_extent() argument
4755 status = ocfs2_grow_tree(handle, et, in ocfs2_insert_extent()
4765 status = ocfs2_do_insert_extent(handle, et, &rec, &insert); in ocfs2_insert_extent()
4784 int ocfs2_add_clusters_in_btree(handle_t *handle, in ocfs2_add_clusters_in_btree() argument
4834 status = __ocfs2_claim_clusters(handle, data_ac, 1, in ocfs2_add_clusters_in_btree()
4845 status = ocfs2_et_root_journal_access(handle, et, in ocfs2_add_clusters_in_btree()
4857 status = ocfs2_insert_extent(handle, et, *logical_offset, block, in ocfs2_add_clusters_in_btree()
4865 ocfs2_journal_dirty(handle, et->et_root_bh); in ocfs2_add_clusters_in_btree()
4879 ocfs2_free_local_alloc_bits(osb, handle, data_ac, in ocfs2_add_clusters_in_btree()
4882 ocfs2_free_clusters(handle, in ocfs2_add_clusters_in_btree()
4916 static int ocfs2_split_and_insert(handle_t *handle, in ocfs2_split_and_insert() argument
4951 ret = ocfs2_grow_tree(handle, et, in ocfs2_split_and_insert()
4989 ret = ocfs2_do_insert_extent(handle, et, &split_rec, &insert); in ocfs2_split_and_insert()
5028 static int ocfs2_replace_extent_rec(handle_t *handle, in ocfs2_replace_extent_rec() argument
5037 ret = ocfs2_path_bh_journal_access(handle, et->et_ci, path, in ocfs2_replace_extent_rec()
5046 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_replace_extent_rec()
5070 int ocfs2_split_extent(handle_t *handle, in ocfs2_split_extent() argument
5130 ret = ocfs2_replace_extent_rec(handle, et, path, el, in ocfs2_split_extent()
5133 ret = ocfs2_split_and_insert(handle, et, path, in ocfs2_split_extent()
5139 ret = ocfs2_try_to_merge_extent(handle, et, path, in ocfs2_split_extent()
5163 int ocfs2_change_extent_flag(handle_t *handle, in ocfs2_change_extent_flag() argument
5230 ret = ocfs2_split_extent(handle, et, left_path, in ocfs2_change_extent_flag()
5253 handle_t *handle, u32 cpos, u32 len, u32 phys, in ocfs2_mark_extent_written() argument
5276 ret = ocfs2_change_extent_flag(handle, et, cpos, in ocfs2_mark_extent_written()
5286 static int ocfs2_split_tree(handle_t *handle, struct ocfs2_extent_tree *et, in ocfs2_split_tree() argument
5324 ret = ocfs2_extend_trans(handle, credits); in ocfs2_split_tree()
5332 ret = ocfs2_grow_tree(handle, et, &depth, &last_eb_bh, in ocfs2_split_tree()
5346 ret = ocfs2_do_insert_extent(handle, et, &split_rec, &insert); in ocfs2_split_tree()
5355 static int ocfs2_truncate_rec(handle_t *handle, in ocfs2_truncate_rec() argument
5372 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_truncate_rec()
5373 jbd2_handle_buffer_credits(handle), in ocfs2_truncate_rec()
5380 ret = ocfs2_rotate_tree_left(handle, et, path, dealloc); in ocfs2_truncate_rec()
5441 ret = ocfs2_extend_rotate_transaction(handle, 0, in ocfs2_truncate_rec()
5442 jbd2_handle_buffer_credits(handle), in ocfs2_truncate_rec()
5449 ret = ocfs2_journal_access_path(et->et_ci, handle, path); in ocfs2_truncate_rec()
5455 ret = ocfs2_journal_access_path(et->et_ci, handle, left_path); in ocfs2_truncate_rec()
5477 ocfs2_adjust_rightmost_records(handle, et, path, in ocfs2_truncate_rec()
5489 ocfs2_adjust_rightmost_records(handle, et, path, rec); in ocfs2_truncate_rec()
5504 ocfs2_complete_edge_insert(handle, left_path, path, in ocfs2_truncate_rec()
5508 ocfs2_journal_dirty(handle, path_leaf_bh(path)); in ocfs2_truncate_rec()
5510 ret = ocfs2_rotate_tree_left(handle, et, path, dealloc); in ocfs2_truncate_rec()
5519 int ocfs2_remove_extent(handle_t *handle, in ocfs2_remove_extent() argument
5589 ret = ocfs2_truncate_rec(handle, et, path, index, dealloc, in ocfs2_remove_extent()
5596 ret = ocfs2_split_tree(handle, et, path, index, in ocfs2_remove_extent()
5643 ret = ocfs2_truncate_rec(handle, et, path, index, dealloc, in ocfs2_remove_extent()
5715 handle_t *handle; in ocfs2_remove_btree_range() local
5760 handle = ocfs2_start_trans(osb, in ocfs2_remove_btree_range()
5762 if (IS_ERR(handle)) { in ocfs2_remove_btree_range()
5763 ret = PTR_ERR(handle); in ocfs2_remove_btree_range()
5768 ret = ocfs2_et_root_journal_access(handle, et, in ocfs2_remove_btree_range()
5778 ret = ocfs2_remove_extent(handle, et, cpos, len, meta_ac, dealloc); in ocfs2_remove_btree_range()
5785 ocfs2_update_inode_fsync_trans(handle, inode, 1); in ocfs2_remove_btree_range()
5787 ocfs2_journal_dirty(handle, et->et_root_bh); in ocfs2_remove_btree_range()
5791 ret = ocfs2_decrease_refcount(inode, handle, in ocfs2_remove_btree_range()
5797 ret = ocfs2_truncate_log_append(osb, handle, in ocfs2_remove_btree_range()
5805 ocfs2_commit_trans(osb, handle); in ocfs2_remove_btree_range()
5852 handle_t *handle, in ocfs2_truncate_log_append() argument
5892 status = ocfs2_journal_access_di(handle, INODE_CACHE(tl_inode), tl_bh, in ocfs2_truncate_log_append()
5920 ocfs2_journal_dirty(handle, tl_bh); in ocfs2_truncate_log_append()
5940 handle_t *handle; in ocfs2_replay_truncate_records() local
5946 handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC); in ocfs2_replay_truncate_records()
5947 if (IS_ERR(handle)) { in ocfs2_replay_truncate_records()
5948 status = PTR_ERR(handle); in ocfs2_replay_truncate_records()
5955 status = ocfs2_journal_access_di(handle, INODE_CACHE(tl_inode), tl_bh, in ocfs2_replay_truncate_records()
5958 ocfs2_commit_trans(osb, handle); in ocfs2_replay_truncate_records()
5965 ocfs2_journal_dirty(handle, tl_bh); in ocfs2_replay_truncate_records()
5979 status = ocfs2_free_clusters(handle, data_alloc_inode, in ocfs2_replay_truncate_records()
5983 ocfs2_commit_trans(osb, handle); in ocfs2_replay_truncate_records()
5989 ocfs2_commit_trans(osb, handle); in ocfs2_replay_truncate_records()
6281 handle_t *handle; in ocfs2_complete_truncate_log_recovery() local
6306 handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_UPDATE); in ocfs2_complete_truncate_log_recovery()
6307 if (IS_ERR(handle)) { in ocfs2_complete_truncate_log_recovery()
6308 status = PTR_ERR(handle); in ocfs2_complete_truncate_log_recovery()
6317 status = ocfs2_truncate_log_append(osb, handle, in ocfs2_complete_truncate_log_recovery()
6319 ocfs2_commit_trans(osb, handle); in ocfs2_complete_truncate_log_recovery()
6422 handle_t *handle; in ocfs2_free_cached_blocks() local
6448 handle = ocfs2_start_trans(osb, OCFS2_SUBALLOC_FREE); in ocfs2_free_cached_blocks()
6449 if (IS_ERR(handle)) { in ocfs2_free_cached_blocks()
6450 ret = PTR_ERR(handle); in ocfs2_free_cached_blocks()
6458 ret = ocfs2_free_suballoc_bits(handle, inode, di_bh, in ocfs2_free_cached_blocks()
6463 ocfs2_commit_trans(osb, handle); in ocfs2_free_cached_blocks()
6515 handle_t *handle; in ocfs2_free_cached_clusters() local
6529 handle = ocfs2_start_trans(osb, OCFS2_TRUNCATE_LOG_UPDATE); in ocfs2_free_cached_clusters()
6530 if (IS_ERR(handle)) { in ocfs2_free_cached_clusters()
6531 ret = PTR_ERR(handle); in ocfs2_free_cached_clusters()
6536 ret = ocfs2_truncate_log_append(osb, handle, head->free_blk, in ocfs2_free_cached_clusters()
6539 ocfs2_commit_trans(osb, handle); in ocfs2_free_cached_clusters()
6681 static int ocfs2_reuse_blk_from_dealloc(handle_t *handle, in ocfs2_reuse_blk_from_dealloc() argument
6733 status = ocfs2_journal_access_eb(handle, et->et_ci, in ocfs2_reuse_blk_from_dealloc()
6759 ocfs2_journal_dirty(handle, new_eb_bh[i]); in ocfs2_reuse_blk_from_dealloc()
6827 static int ocfs2_zero_func(handle_t *handle, struct buffer_head *bh) in ocfs2_zero_func() argument
6834 void ocfs2_map_and_dirty_folio(struct inode *inode, handle_t *handle, in ocfs2_map_and_dirty_folio() argument
6854 ret = walk_page_buffers(handle, folio_buffers(folio), in ocfs2_map_and_dirty_folio()
6860 ret = ocfs2_jbd2_inode_add_write(handle, inode, in ocfs2_map_and_dirty_folio()
6874 u64 phys, handle_t *handle) in ocfs2_zero_cluster_folios() argument
6892 ocfs2_map_and_dirty_folio(inode, handle, from, to, folio, 1, in ocfs2_zero_cluster_folios()
6960 int ocfs2_zero_range_for_truncate(struct inode *inode, handle_t *handle, in ocfs2_zero_range_for_truncate() argument
7016 numfolios, phys, handle); in ocfs2_zero_range_for_truncate()
7085 handle_t *handle; in ocfs2_convert_inline_data_to_extents() local
7105 handle = ocfs2_start_trans(osb, in ocfs2_convert_inline_data_to_extents()
7107 if (IS_ERR(handle)) { in ocfs2_convert_inline_data_to_extents()
7108 ret = PTR_ERR(handle); in ocfs2_convert_inline_data_to_extents()
7113 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_convert_inline_data_to_extents()
7133 ret = ocfs2_claim_clusters(handle, data_ac, 1, &bit_off, in ocfs2_convert_inline_data_to_extents()
7165 ocfs2_map_and_dirty_folio(inode, handle, 0, page_end, folio, 0, in ocfs2_convert_inline_data_to_extents()
7174 ocfs2_update_inode_fsync_trans(handle, inode, 1); in ocfs2_convert_inline_data_to_extents()
7177 ocfs2_journal_dirty(handle, di_bh); in ocfs2_convert_inline_data_to_extents()
7186 ret = ocfs2_insert_extent(handle, &et, 0, block, 1, 0, NULL); in ocfs2_convert_inline_data_to_extents()
7207 ocfs2_free_local_alloc_bits(osb, handle, data_ac, in ocfs2_convert_inline_data_to_extents()
7210 ocfs2_free_clusters(handle, in ocfs2_convert_inline_data_to_extents()
7217 ocfs2_commit_trans(osb, handle); in ocfs2_convert_inline_data_to_extents()
7410 handle_t *handle; in ocfs2_truncate_inline() local
7437 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_truncate_inline()
7438 if (IS_ERR(handle)) { in ocfs2_truncate_inline()
7439 ret = PTR_ERR(handle); in ocfs2_truncate_inline()
7444 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_truncate_inline()
7471 ocfs2_update_inode_fsync_trans(handle, inode, 1); in ocfs2_truncate_inline()
7472 ocfs2_journal_dirty(handle, di_bh); in ocfs2_truncate_inline()
7475 ocfs2_commit_trans(osb, handle); in ocfs2_truncate_inline()