• Home
  • Raw
  • Download

Lines Matching refs:handle

328 static int ext4_alloc_branch(handle_t *handle,  in ext4_alloc_branch()  argument
340 new_blocks[i] = ext4_mb_new_blocks(handle, ar, &err); in ext4_alloc_branch()
342 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch()
361 err = ext4_journal_get_create_access(handle, bh); in ext4_alloc_branch()
381 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch()
395 ext4_forget(handle, 1, ar->inode, branch[i].bh, in ext4_alloc_branch()
397 ext4_free_blocks(handle, ar->inode, NULL, new_blocks[i], in ext4_alloc_branch()
414 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument
429 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch()
460 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch()
467 ext4_mark_inode_dirty(handle, ar->inode); in ext4_splice_branch()
479 ext4_free_blocks(handle, ar->inode, where[i].bh, 0, 1, in ext4_splice_branch()
482 ext4_free_blocks(handle, ar->inode, NULL, le32_to_cpu(where[num].key), in ext4_splice_branch()
516 int ext4_ind_map_blocks(handle_t *handle, struct inode *inode, in ext4_ind_map_blocks() argument
533 J_ASSERT(handle != NULL || (flags & EXT4_GET_BLOCKS_CREATE) == 0); in ext4_ind_map_blocks()
620 err = ext4_alloc_branch(handle, &ar, indirect_blks, in ext4_ind_map_blocks()
631 err = ext4_splice_branch(handle, &ar, partial, indirect_blks); in ext4_ind_map_blocks()
637 ext4_update_inode_fsync_trans(handle, inode, 1); in ext4_ind_map_blocks()
719 static int try_to_extend_transaction(handle_t *handle, struct inode *inode) in try_to_extend_transaction() argument
721 if (!ext4_handle_valid(handle)) in try_to_extend_transaction()
723 if (ext4_handle_has_enough_credits(handle, EXT4_RESERVE_TRANS_BLOCKS+1)) in try_to_extend_transaction()
725 if (!ext4_journal_extend(handle, ext4_blocks_for_truncate(inode))) in try_to_extend_transaction()
838 static int ext4_clear_blocks(handle_t *handle, struct inode *inode, in ext4_clear_blocks() argument
862 if (try_to_extend_transaction(handle, inode)) { in ext4_clear_blocks()
865 err = ext4_handle_dirty_metadata(handle, inode, bh); in ext4_clear_blocks()
869 err = ext4_mark_inode_dirty(handle, inode); in ext4_clear_blocks()
872 err = ext4_truncate_restart_trans(handle, inode, in ext4_clear_blocks()
878 err = ext4_journal_get_write_access(handle, bh); in ext4_clear_blocks()
887 ext4_free_blocks(handle, inode, NULL, block_to_free, count, flags); in ext4_clear_blocks()
913 static void ext4_free_data(handle_t *handle, struct inode *inode, in ext4_free_data() argument
929 err = ext4_journal_get_write_access(handle, this_bh); in ext4_free_data()
947 err = ext4_clear_blocks(handle, inode, this_bh, in ext4_free_data()
960 err = ext4_clear_blocks(handle, inode, this_bh, block_to_free, in ext4_free_data()
976 ext4_handle_dirty_metadata(handle, inode, this_bh); in ext4_free_data()
998 static void ext4_free_branches(handle_t *handle, struct inode *inode, in ext4_free_branches() argument
1005 if (ext4_handle_is_aborted(handle)) in ext4_free_branches()
1041 ext4_free_branches(handle, inode, bh, in ext4_free_branches()
1063 if (ext4_handle_is_aborted(handle)) in ext4_free_branches()
1065 if (try_to_extend_transaction(handle, inode)) { in ext4_free_branches()
1066 ext4_mark_inode_dirty(handle, inode); in ext4_free_branches()
1067 ext4_truncate_restart_trans(handle, inode, in ext4_free_branches()
1082 ext4_free_blocks(handle, inode, NULL, nr, 1, in ext4_free_branches()
1092 if (!ext4_journal_get_write_access(handle, in ext4_free_branches()
1097 ext4_handle_dirty_metadata(handle, in ext4_free_branches()
1106 ext4_free_data(handle, inode, parent_bh, first, last); in ext4_free_branches()
1110 void ext4_ind_truncate(handle_t *handle, struct inode *inode) in ext4_ind_truncate() argument
1152 ext4_free_data(handle, inode, NULL, i_data+offsets[0], in ext4_ind_truncate()
1162 ext4_free_branches(handle, inode, NULL, in ext4_ind_truncate()
1172 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_truncate()
1179 ext4_free_branches(handle, inode, partial->bh, partial->p + 1, in ext4_ind_truncate()
1192 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); in ext4_ind_truncate()
1199 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); in ext4_ind_truncate()
1206 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); in ext4_ind_truncate()
1225 int ext4_ind_remove_space(handle_t *handle, struct inode *inode, in ext4_ind_remove_space() argument
1254 ext4_free_data(handle, inode, NULL, i_data + offsets[0], in ext4_ind_remove_space()
1270 ext4_free_data(handle, inode, NULL, i_data + offsets[0], in ext4_ind_remove_space()
1280 ext4_free_branches(handle, inode, NULL, in ext4_ind_remove_space()
1286 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1297 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1331 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1360 ext4_free_branches(handle, inode, NULL, in ext4_ind_remove_space()
1367 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1395 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1410 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1417 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1446 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); in ext4_ind_remove_space()
1455 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); in ext4_ind_remove_space()
1464 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); in ext4_ind_remove_space()