Lines Matching refs:tp
70 xfs_trans_t **tp, /* transaction pointer addr */ in xfs_bmap_finish() argument
83 ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_bmap_finish()
88 ntp = *tp; in xfs_bmap_finish()
97 ntp = xfs_trans_dup(*tp); in xfs_bmap_finish()
98 error = xfs_trans_commit(*tp, 0); in xfs_bmap_finish()
99 *tp = ntp; in xfs_bmap_finish()
192 xfs_trans_ijoin(ap->tp, mp->m_rbmip, XFS_ILOCK_EXCL); in xfs_bmap_rtalloc()
201 error = xfs_rtpick_extent(mp, ap->tp, ralen, &rtx); in xfs_bmap_rtalloc()
218 if ((error = xfs_rtallocate_extent(ap->tp, ap->blkno, 1, ap->length, in xfs_bmap_rtalloc()
222 (error = xfs_rtallocate_extent(ap->tp, ap->blkno, 1, in xfs_bmap_rtalloc()
232 xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE); in xfs_bmap_rtalloc()
239 xfs_trans_mod_dquot_byino(ap->tp, ap->ip, in xfs_bmap_rtalloc()
320 xfs_trans_t *tp, /* transaction pointer */ in xfs_bmap_count_tree() argument
335 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, XFS_BMAP_BTREE_REF, in xfs_bmap_count_tree()
346 error = xfs_btree_read_bufl(mp, tp, nextbno, 0, &nbp, in xfs_bmap_count_tree()
354 xfs_trans_brelse(tp, nbp); in xfs_bmap_count_tree()
361 xfs_bmap_count_tree(mp, tp, ifp, bno, level, count)) < 0)) { in xfs_bmap_count_tree()
362 xfs_trans_brelse(tp, bp); in xfs_bmap_count_tree()
367 xfs_trans_brelse(tp, bp); in xfs_bmap_count_tree()
374 xfs_trans_brelse(tp, bp); in xfs_bmap_count_tree()
378 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, in xfs_bmap_count_tree()
395 xfs_trans_t *tp, /* transaction pointer */ in xfs_bmap_count_blocks() argument
429 if (unlikely(xfs_bmap_count_tree(mp, tp, ifp, bno, level, count) < 0)) { in xfs_bmap_count_blocks()
839 xfs_trans_t *tp; in xfs_free_eofblocks() local
877 tp = xfs_trans_alloc(mp, XFS_TRANS_INACTIVE); in xfs_free_eofblocks()
881 xfs_trans_cancel(tp, 0); in xfs_free_eofblocks()
886 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_itruncate, 0, 0); in xfs_free_eofblocks()
889 xfs_trans_cancel(tp, 0); in xfs_free_eofblocks()
896 xfs_trans_ijoin(tp, ip, 0); in xfs_free_eofblocks()
904 error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, in xfs_free_eofblocks()
911 xfs_trans_cancel(tp, in xfs_free_eofblocks()
915 error = xfs_trans_commit(tp, in xfs_free_eofblocks()
945 xfs_trans_t *tp; in xfs_alloc_file_space() local
1018 tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT); in xfs_alloc_file_space()
1019 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write, in xfs_alloc_file_space()
1029 xfs_trans_cancel(tp, 0); in xfs_alloc_file_space()
1033 error = xfs_trans_reserve_quota_nblks(tp, ip, qblocks, in xfs_alloc_file_space()
1038 xfs_trans_ijoin(tp, ip, 0); in xfs_alloc_file_space()
1041 error = xfs_bmapi_write(tp, ip, startoffset_fsb, in xfs_alloc_file_space()
1051 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_alloc_file_space()
1056 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_alloc_file_space()
1077 xfs_trans_unreserve_quota_nblks(tp, ip, (long)qblocks, 0, quota_flag); in xfs_alloc_file_space()
1080 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT); in xfs_alloc_file_space()
1187 xfs_trans_t *tp; in xfs_free_file_space() local
1281 tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT); in xfs_free_file_space()
1282 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write, resblks, 0); in xfs_free_file_space()
1292 xfs_trans_cancel(tp, 0); in xfs_free_file_space()
1296 error = xfs_trans_reserve_quota(tp, mp, in xfs_free_file_space()
1302 xfs_trans_ijoin(tp, ip, 0); in xfs_free_file_space()
1308 error = xfs_bunmapi(tp, ip, startoffset_fsb, in xfs_free_file_space()
1318 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_free_file_space()
1323 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_free_file_space()
1333 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT); in xfs_free_file_space()
1395 struct xfs_trans *tp; in xfs_shift_file_space() local
1455 tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT); in xfs_shift_file_space()
1462 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write, in xfs_shift_file_space()
1465 xfs_trans_cancel(tp, 0); in xfs_shift_file_space()
1470 error = xfs_trans_reserve_quota(tp, mp, ip->i_udquot, in xfs_shift_file_space()
1477 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_shift_file_space()
1485 error = xfs_bmap_shift_extents(tp, ip, &next_fsb, shift_fsb, in xfs_shift_file_space()
1491 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_shift_file_space()
1495 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_shift_file_space()
1501 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT); in xfs_shift_file_space()
1673 xfs_trans_t *tp; in xfs_swap_extents() local
1718 tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); in xfs_swap_extents()
1719 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_ichange, 0, 0); in xfs_swap_extents()
1721 xfs_trans_cancel(tp, 0); in xfs_swap_extents()
1731 xfs_trans_ijoin(tp, ip, lock_flags); in xfs_swap_extents()
1732 xfs_trans_ijoin(tp, tip, lock_flags); in xfs_swap_extents()
1774 error = xfs_bmap_count_blocks(tp, ip, XFS_ATTR_FORK, &aforkblks); in xfs_swap_extents()
1780 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, in xfs_swap_extents()
1804 error = xfs_bmbt_change_owner(tp, ip, XFS_DATA_FORK, in xfs_swap_extents()
1813 error = xfs_bmbt_change_owner(tp, tip, XFS_DATA_FORK, in xfs_swap_extents()
1894 xfs_trans_log_inode(tp, ip, src_log_flags); in xfs_swap_extents()
1895 xfs_trans_log_inode(tp, tip, target_log_flags); in xfs_swap_extents()
1902 xfs_trans_set_sync(tp); in xfs_swap_extents()
1904 error = xfs_trans_commit(tp, 0); in xfs_swap_extents()
1918 xfs_trans_cancel(tp, 0); in xfs_swap_extents()