Lines Matching refs:tp
131 struct xfs_trans *tp, in xfs_reflink_find_shared() argument
143 error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp); in xfs_reflink_find_shared()
147 cur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno); in xfs_reflink_find_shared()
154 xfs_trans_brelse(tp, agbp); in xfs_reflink_find_shared()
356 struct xfs_trans *tp; in xfs_reflink_allocate_cow() local
379 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp); in xfs_reflink_allocate_cow()
397 xfs_trans_cancel(tp); in xfs_reflink_allocate_cow()
401 error = xfs_trans_reserve_quota_nblks(tp, ip, resblks, 0, in xfs_reflink_allocate_cow()
406 xfs_trans_ijoin(tp, ip, 0); in xfs_reflink_allocate_cow()
410 error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount, in xfs_reflink_allocate_cow()
417 error = xfs_trans_commit(tp); in xfs_reflink_allocate_cow()
440 xfs_trans_unreserve_quota_nblks(tp, ip, (long)resblks, 0, in xfs_reflink_allocate_cow()
443 xfs_trans_cancel(tp); in xfs_reflink_allocate_cow()
544 struct xfs_trans *tp; in xfs_reflink_cancel_cow_range() local
560 0, 0, 0, &tp); in xfs_reflink_cancel_cow_range()
565 xfs_trans_ijoin(tp, ip, 0); in xfs_reflink_cancel_cow_range()
568 error = xfs_reflink_cancel_cow_blocks(ip, &tp, offset_fsb, end_fsb, in xfs_reflink_cancel_cow_range()
573 error = xfs_trans_commit(tp); in xfs_reflink_cancel_cow_range()
579 xfs_trans_cancel(tp); in xfs_reflink_cancel_cow_range()
605 struct xfs_trans *tp; in xfs_reflink_end_cow_extent() local
619 XFS_TRANS_RESERVE, &tp); in xfs_reflink_end_cow_extent()
629 xfs_trans_ijoin(tp, ip, 0); in xfs_reflink_end_cow_extent()
665 error = __xfs_bunmapi(tp, ip, del.br_startoff, &rlen, 0, 1); in xfs_reflink_end_cow_extent()
674 xfs_refcount_free_cow_extent(tp, del.br_startblock, del.br_blockcount); in xfs_reflink_end_cow_extent()
677 xfs_bmap_map_extent(tp, ip, &del); in xfs_reflink_end_cow_extent()
680 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_DELBCOUNT, in xfs_reflink_end_cow_extent()
686 error = xfs_trans_commit(tp); in xfs_reflink_end_cow_extent()
696 xfs_trans_cancel(tp); in xfs_reflink_end_cow_extent()
867 struct xfs_trans *tp; in xfs_reflink_set_inode_flag() local
872 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); in xfs_reflink_set_inode_flag()
884 xfs_trans_ijoin(tp, src, XFS_ILOCK_EXCL); in xfs_reflink_set_inode_flag()
886 xfs_trans_log_inode(tp, src, XFS_ILOG_CORE); in xfs_reflink_set_inode_flag()
896 xfs_trans_ijoin(tp, dest, XFS_ILOCK_EXCL); in xfs_reflink_set_inode_flag()
898 xfs_trans_log_inode(tp, dest, XFS_ILOG_CORE); in xfs_reflink_set_inode_flag()
904 error = xfs_trans_commit(tp); in xfs_reflink_set_inode_flag()
925 struct xfs_trans *tp; in xfs_reflink_update_dest() local
931 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); in xfs_reflink_update_dest()
936 xfs_trans_ijoin(tp, dest, XFS_ILOCK_EXCL); in xfs_reflink_update_dest()
949 xfs_trans_log_inode(tp, dest, XFS_ILOG_CORE); in xfs_reflink_update_dest()
951 error = xfs_trans_commit(tp); in xfs_reflink_update_dest()
998 struct xfs_trans *tp; in xfs_reflink_remap_extent() local
1009 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp); in xfs_reflink_remap_extent()
1014 xfs_trans_ijoin(tp, ip, 0); in xfs_reflink_remap_extent()
1091 error = xfs_trans_reserve_quota_nblks(tp, ip, qres, 0, in xfs_reflink_remap_extent()
1102 xfs_bmap_unmap_extent(tp, ip, &smap); in xfs_reflink_remap_extent()
1103 xfs_refcount_decrease_extent(tp, &smap); in xfs_reflink_remap_extent()
1125 xfs_refcount_increase_extent(tp, dmap); in xfs_reflink_remap_extent()
1126 xfs_bmap_map_extent(tp, ip, dmap); in xfs_reflink_remap_extent()
1130 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, qdelta); in xfs_reflink_remap_extent()
1139 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_reflink_remap_extent()
1143 error = xfs_trans_commit(tp); in xfs_reflink_remap_extent()
1147 xfs_trans_cancel(tp); in xfs_reflink_remap_extent()
1357 struct xfs_trans *tp, in xfs_reflink_inode_has_shared_extents() argument
1375 error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); in xfs_reflink_inode_has_shared_extents()
1390 error = xfs_reflink_find_shared(mp, tp, agno, agbno, aglen, in xfs_reflink_inode_has_shared_extents()
1453 struct xfs_trans *tp; in xfs_reflink_try_clear_inode_flag() local
1457 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp); in xfs_reflink_try_clear_inode_flag()
1462 xfs_trans_ijoin(tp, ip, 0); in xfs_reflink_try_clear_inode_flag()
1464 error = xfs_reflink_clear_inode_flag(ip, &tp); in xfs_reflink_try_clear_inode_flag()
1468 error = xfs_trans_commit(tp); in xfs_reflink_try_clear_inode_flag()
1475 xfs_trans_cancel(tp); in xfs_reflink_try_clear_inode_flag()