• Home
  • Raw
  • Download

Lines Matching refs:handle

322 static int ext4_alloc_branch(handle_t *handle,  in ext4_alloc_branch()  argument
334 new_blocks[i] = ext4_mb_new_blocks(handle, ar, &err); in ext4_alloc_branch()
336 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch()
355 err = ext4_journal_get_create_access(handle, bh); in ext4_alloc_branch()
375 err = ext4_handle_dirty_metadata(handle, ar->inode, bh); in ext4_alloc_branch()
389 ext4_forget(handle, 1, ar->inode, branch[i].bh, in ext4_alloc_branch()
391 ext4_free_blocks(handle, ar->inode, NULL, new_blocks[i], in ext4_alloc_branch()
412 static int ext4_splice_branch(handle_t *handle, in ext4_splice_branch() argument
427 err = ext4_journal_get_write_access(handle, where->bh); in ext4_splice_branch()
458 err = ext4_handle_dirty_metadata(handle, ar->inode, where->bh); in ext4_splice_branch()
465 ext4_mark_inode_dirty(handle, ar->inode); in ext4_splice_branch()
477 ext4_free_blocks(handle, ar->inode, where[i].bh, 0, 1, in ext4_splice_branch()
480 ext4_free_blocks(handle, ar->inode, NULL, le32_to_cpu(where[num].key), in ext4_splice_branch()
514 int ext4_ind_map_blocks(handle_t *handle, struct inode *inode, in ext4_ind_map_blocks() argument
531 J_ASSERT(handle != NULL || (flags & EXT4_GET_BLOCKS_CREATE) == 0); in ext4_ind_map_blocks()
597 err = ext4_alloc_branch(handle, &ar, indirect_blks, in ext4_ind_map_blocks()
608 err = ext4_splice_branch(handle, &ar, partial, indirect_blks); in ext4_ind_map_blocks()
614 ext4_update_inode_fsync_trans(handle, inode, 1); in ext4_ind_map_blocks()
653 handle_t *handle; in ext4_ind_direct_IO() local
664 handle = ext4_journal_start(inode, EXT4_HT_INODE, 2); in ext4_ind_direct_IO()
665 if (IS_ERR(handle)) { in ext4_ind_direct_IO()
666 ret = PTR_ERR(handle); in ext4_ind_direct_IO()
669 ret = ext4_orphan_add(handle, inode); in ext4_ind_direct_IO()
671 ext4_journal_stop(handle); in ext4_ind_direct_IO()
676 ext4_journal_stop(handle); in ext4_ind_direct_IO()
727 handle = ext4_journal_start(inode, EXT4_HT_INODE, 2); in ext4_ind_direct_IO()
728 if (IS_ERR(handle)) { in ext4_ind_direct_IO()
732 ret = PTR_ERR(handle); in ext4_ind_direct_IO()
739 ext4_orphan_del(handle, inode); in ext4_ind_direct_IO()
752 ext4_mark_inode_dirty(handle, inode); in ext4_ind_direct_IO()
755 err = ext4_journal_stop(handle); in ext4_ind_direct_IO()
815 static int try_to_extend_transaction(handle_t *handle, struct inode *inode) in try_to_extend_transaction() argument
817 if (!ext4_handle_valid(handle)) in try_to_extend_transaction()
819 if (ext4_handle_has_enough_credits(handle, EXT4_RESERVE_TRANS_BLOCKS+1)) in try_to_extend_transaction()
821 if (!ext4_journal_extend(handle, ext4_blocks_for_truncate(inode))) in try_to_extend_transaction()
934 static int ext4_clear_blocks(handle_t *handle, struct inode *inode, in ext4_clear_blocks() argument
956 if (try_to_extend_transaction(handle, inode)) { in ext4_clear_blocks()
959 err = ext4_handle_dirty_metadata(handle, inode, bh); in ext4_clear_blocks()
963 err = ext4_mark_inode_dirty(handle, inode); in ext4_clear_blocks()
966 err = ext4_truncate_restart_trans(handle, inode, in ext4_clear_blocks()
972 err = ext4_journal_get_write_access(handle, bh); in ext4_clear_blocks()
981 ext4_free_blocks(handle, inode, NULL, block_to_free, count, flags); in ext4_clear_blocks()
1007 static void ext4_free_data(handle_t *handle, struct inode *inode, in ext4_free_data() argument
1023 err = ext4_journal_get_write_access(handle, this_bh); in ext4_free_data()
1041 err = ext4_clear_blocks(handle, inode, this_bh, in ext4_free_data()
1054 err = ext4_clear_blocks(handle, inode, this_bh, block_to_free, in ext4_free_data()
1070 ext4_handle_dirty_metadata(handle, inode, this_bh); in ext4_free_data()
1092 static void ext4_free_branches(handle_t *handle, struct inode *inode, in ext4_free_branches() argument
1099 if (ext4_handle_is_aborted(handle)) in ext4_free_branches()
1134 ext4_free_branches(handle, inode, bh, in ext4_free_branches()
1156 if (ext4_handle_is_aborted(handle)) in ext4_free_branches()
1158 if (try_to_extend_transaction(handle, inode)) { in ext4_free_branches()
1159 ext4_mark_inode_dirty(handle, inode); in ext4_free_branches()
1160 ext4_truncate_restart_trans(handle, inode, in ext4_free_branches()
1175 ext4_free_blocks(handle, inode, NULL, nr, 1, in ext4_free_branches()
1185 if (!ext4_journal_get_write_access(handle, in ext4_free_branches()
1190 ext4_handle_dirty_metadata(handle, in ext4_free_branches()
1199 ext4_free_data(handle, inode, parent_bh, first, last); in ext4_free_branches()
1203 void ext4_ind_truncate(handle_t *handle, struct inode *inode) in ext4_ind_truncate() argument
1245 ext4_free_data(handle, inode, NULL, i_data+offsets[0], in ext4_ind_truncate()
1255 ext4_free_branches(handle, inode, NULL, in ext4_ind_truncate()
1265 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_truncate()
1272 ext4_free_branches(handle, inode, partial->bh, partial->p + 1, in ext4_ind_truncate()
1285 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); in ext4_ind_truncate()
1291 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); in ext4_ind_truncate()
1297 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); in ext4_ind_truncate()
1315 int ext4_ind_remove_space(handle_t *handle, struct inode *inode, in ext4_ind_remove_space() argument
1344 ext4_free_data(handle, inode, NULL, i_data + offsets[0], in ext4_ind_remove_space()
1360 ext4_free_data(handle, inode, NULL, i_data + offsets[0], in ext4_ind_remove_space()
1370 ext4_free_branches(handle, inode, NULL, in ext4_ind_remove_space()
1376 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1387 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1421 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1450 ext4_free_branches(handle, inode, NULL, in ext4_ind_remove_space()
1457 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1485 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1500 ext4_free_branches(handle, inode, partial->bh, in ext4_ind_remove_space()
1507 ext4_free_branches(handle, inode, partial2->bh, in ext4_ind_remove_space()
1536 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); in ext4_ind_remove_space()
1544 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); in ext4_ind_remove_space()
1552 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); in ext4_ind_remove_space()