Lines Matching refs:tp

750 	xfs_trans_t	*tp,  in xfs_ialloc()  argument
759 struct xfs_mount *mp = tp->t_mountp; in xfs_ialloc()
771 error = xfs_dialloc(tp, pip ? pip->i_ino : 0, mode, in xfs_ialloc()
798 error = xfs_iget(mp, tp, ino, XFS_IGET_CREATE, in xfs_ialloc()
945 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_ialloc()
946 xfs_trans_log_inode(tp, ip, flags); in xfs_ialloc()
978 xfs_trans_t *tp; in xfs_dir_ialloc() local
985 tp = *tpp; in xfs_dir_ialloc()
986 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_dir_ialloc()
1003 code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, &ialloc_context, in xfs_dir_ialloc()
1034 xfs_trans_bhold(tp, ialloc_context); in xfs_dir_ialloc()
1043 if (tp->t_dqinfo) { in xfs_dir_ialloc()
1044 dqinfo = (void *)tp->t_dqinfo; in xfs_dir_ialloc()
1045 tp->t_dqinfo = NULL; in xfs_dir_ialloc()
1046 tflags = tp->t_flags & XFS_TRANS_DQ_DIRTY; in xfs_dir_ialloc()
1047 tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY); in xfs_dir_ialloc()
1050 code = xfs_trans_roll(&tp); in xfs_dir_ialloc()
1056 tp->t_dqinfo = dqinfo; in xfs_dir_ialloc()
1057 tp->t_flags |= tflags; in xfs_dir_ialloc()
1062 *tpp = tp; in xfs_dir_ialloc()
1066 xfs_trans_bjoin(tp, ialloc_context); in xfs_dir_ialloc()
1073 code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, in xfs_dir_ialloc()
1081 *tpp = tp; in xfs_dir_ialloc()
1090 *tpp = tp; in xfs_dir_ialloc()
1102 xfs_trans_t *tp, in xfs_droplink() argument
1105 xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); in xfs_droplink()
1108 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_droplink()
1113 return xfs_iunlink(tp, ip); in xfs_droplink()
1121 xfs_trans_t *tp, in xfs_bumplink() argument
1124 xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); in xfs_bumplink()
1128 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_bumplink()
1143 struct xfs_trans *tp = NULL; in xfs_create() local
1184 error = xfs_trans_alloc(mp, tres, resblks, 0, 0, &tp); in xfs_create()
1188 error = xfs_trans_alloc(mp, tres, resblks, 0, 0, &tp); in xfs_create()
1199 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create()
1209 error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev, prid, &ip); in xfs_create()
1220 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); in xfs_create()
1223 error = xfs_dir_createname(tp, dp, name, ip->i_ino, in xfs_create()
1230 xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_create()
1231 xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); in xfs_create()
1234 error = xfs_dir_init(tp, ip, dp); in xfs_create()
1238 error = xfs_bumplink(tp, dp); in xfs_create()
1249 xfs_trans_set_sync(tp); in xfs_create()
1256 xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); in xfs_create()
1258 error = xfs_trans_commit(tp); in xfs_create()
1270 xfs_trans_cancel(tp); in xfs_create()
1299 struct xfs_trans *tp = NULL; in xfs_create_tmpfile() local
1326 error = xfs_trans_alloc(mp, tres, resblks, 0, 0, &tp); in xfs_create_tmpfile()
1330 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create_tmpfile()
1335 error = xfs_dir_ialloc(&tp, dp, mode, 0, 0, prid, &ip); in xfs_create_tmpfile()
1340 xfs_trans_set_sync(tp); in xfs_create_tmpfile()
1347 xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); in xfs_create_tmpfile()
1349 error = xfs_iunlink(tp, ip); in xfs_create_tmpfile()
1353 error = xfs_trans_commit(tp); in xfs_create_tmpfile()
1365 xfs_trans_cancel(tp); in xfs_create_tmpfile()
1391 xfs_trans_t *tp; in xfs_link() local
1411 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_link, resblks, 0, 0, &tp); in xfs_link()
1414 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_link, 0, 0, 0, &tp); in xfs_link()
1421 xfs_trans_ijoin(tp, sip, XFS_ILOCK_EXCL); in xfs_link()
1422 xfs_trans_ijoin(tp, tdp, XFS_ILOCK_EXCL); in xfs_link()
1436 error = xfs_dir_canenter(tp, tdp, target_name); in xfs_link()
1445 error = xfs_iunlink_remove(tp, sip); in xfs_link()
1450 error = xfs_dir_createname(tp, tdp, target_name, sip->i_ino, in xfs_link()
1454 xfs_trans_ichgtime(tp, tdp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_link()
1455 xfs_trans_log_inode(tp, tdp, XFS_ILOG_CORE); in xfs_link()
1457 error = xfs_bumplink(tp, sip); in xfs_link()
1467 xfs_trans_set_sync(tp); in xfs_link()
1469 return xfs_trans_commit(tp); in xfs_link()
1472 xfs_trans_cancel(tp); in xfs_link()
1525 struct xfs_trans *tp = *tpp; in xfs_itruncate_extents_flags() local
1536 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_itruncate_extents_flags()
1562 ASSERT(tp->t_firstblock == NULLFSBLOCK); in xfs_itruncate_extents_flags()
1563 error = xfs_bunmapi(tp, ip, first_unmap_block, unmap_len, flags, in xfs_itruncate_extents_flags()
1572 error = xfs_defer_finish(&tp); in xfs_itruncate_extents_flags()
1576 error = xfs_trans_roll_inode(&tp, ip); in xfs_itruncate_extents_flags()
1583 error = xfs_reflink_cancel_cow_blocks(ip, &tp, in xfs_itruncate_extents_flags()
1595 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_itruncate_extents_flags()
1600 *tpp = tp; in xfs_itruncate_extents_flags()
1694 struct xfs_trans *tp; in xfs_inactive_truncate() local
1697 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); in xfs_inactive_truncate()
1703 xfs_trans_ijoin(tp, ip, 0); in xfs_inactive_truncate()
1711 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_inactive_truncate()
1713 error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, 0); in xfs_inactive_truncate()
1719 error = xfs_trans_commit(tp); in xfs_inactive_truncate()
1727 xfs_trans_cancel(tp); in xfs_inactive_truncate()
1743 struct xfs_trans *tp; in xfs_inactive_ifree() local
1760 &tp); in xfs_inactive_ifree()
1762 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ifree, 0, 0, 0, &tp); in xfs_inactive_ifree()
1796 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_inactive_ifree()
1798 error = xfs_ifree(tp, ip); in xfs_inactive_ifree()
1811 xfs_trans_cancel(tp); in xfs_inactive_ifree()
1818 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_ICOUNT, -1); in xfs_inactive_ifree()
1824 error = xfs_trans_commit(tp); in xfs_inactive_ifree()
1937 struct xfs_trans *tp, in xfs_iunlink() argument
1940 xfs_mount_t *mp = tp->t_mountp; in xfs_iunlink()
1957 error = xfs_read_agi(mp, tp, XFS_INO_TO_AGNO(mp, ip->i_ino), &agibp); in xfs_iunlink()
1979 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink()
1992 xfs_trans_inode_buf(tp, ibp); in xfs_iunlink()
1993 xfs_trans_log_buf(tp, ibp, offset, in xfs_iunlink()
2005 xfs_trans_log_buf(tp, agibp, offset, in xfs_iunlink()
2015 xfs_trans_t *tp, in xfs_iunlink_remove() argument
2033 mp = tp->t_mountp; in xfs_iunlink_remove()
2040 error = xfs_read_agi(mp, tp, agno, &agibp); in xfs_iunlink_remove()
2069 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2086 xfs_trans_inode_buf(tp, ibp); in xfs_iunlink_remove()
2087 xfs_trans_log_buf(tp, ibp, offset, in xfs_iunlink_remove()
2091 xfs_trans_brelse(tp, ibp); in xfs_iunlink_remove()
2101 xfs_trans_log_buf(tp, agibp, offset, in xfs_iunlink_remove()
2113 xfs_trans_brelse(tp, last_ibp); in xfs_iunlink_remove()
2118 error = xfs_imap(mp, tp, next_ino, &imap, 0); in xfs_iunlink_remove()
2126 error = xfs_imap_to_bp(mp, tp, &imap, &last_dip, in xfs_iunlink_remove()
2149 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2167 xfs_trans_inode_buf(tp, ibp); in xfs_iunlink_remove()
2168 xfs_trans_log_buf(tp, ibp, offset, in xfs_iunlink_remove()
2172 xfs_trans_brelse(tp, ibp); in xfs_iunlink_remove()
2184 xfs_trans_inode_buf(tp, last_ibp); in xfs_iunlink_remove()
2185 xfs_trans_log_buf(tp, last_ibp, offset, in xfs_iunlink_remove()
2200 xfs_trans_t *tp, in xfs_ifree_cluster() argument
2246 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, in xfs_ifree_cluster()
2380 xfs_trans_stale_inode_buf(tp, bp); in xfs_ifree_cluster()
2381 xfs_trans_binval(tp, bp); in xfs_ifree_cluster()
2418 struct xfs_trans *tp, in xfs_ifree() argument
2434 error = xfs_iunlink_remove(tp, ip); in xfs_ifree()
2438 error = xfs_difree(tp, ip->i_ino, &xic); in xfs_ifree()
2461 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_ifree()
2464 error = xfs_ifree_cluster(ip, tp, &xic); in xfs_ifree()
2546 xfs_trans_t *tp = NULL; in xfs_remove() local
2574 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_remove, resblks, 0, 0, &tp); in xfs_remove()
2578 &tp); in xfs_remove()
2587 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); in xfs_remove()
2588 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_remove()
2605 error = xfs_droplink(tp, dp); in xfs_remove()
2610 error = xfs_droplink(tp, ip); in xfs_remove()
2619 xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); in xfs_remove()
2621 xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_remove()
2624 error = xfs_droplink(tp, ip); in xfs_remove()
2628 error = xfs_dir_removename(tp, dp, name, ip->i_ino, resblks); in xfs_remove()
2640 xfs_trans_set_sync(tp); in xfs_remove()
2642 error = xfs_trans_commit(tp); in xfs_remove()
2652 xfs_trans_cancel(tp); in xfs_remove()
2710 struct xfs_trans *tp) in xfs_finish_rename() argument
2716 if (tp->t_mountp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) in xfs_finish_rename()
2717 xfs_trans_set_sync(tp); in xfs_finish_rename()
2719 return xfs_trans_commit(tp); in xfs_finish_rename()
2729 struct xfs_trans *tp, in xfs_cross_rename() argument
2744 error = xfs_dir_replace(tp, dp1, name1, ip2->i_ino, spaceres); in xfs_cross_rename()
2749 error = xfs_dir_replace(tp, dp2, name2, ip1->i_ino, spaceres); in xfs_cross_rename()
2762 error = xfs_dir_replace(tp, ip2, &xfs_name_dotdot, in xfs_cross_rename()
2769 error = xfs_droplink(tp, dp2); in xfs_cross_rename()
2772 error = xfs_bumplink(tp, dp1); in xfs_cross_rename()
2788 error = xfs_dir_replace(tp, ip1, &xfs_name_dotdot, in xfs_cross_rename()
2795 error = xfs_droplink(tp, dp1); in xfs_cross_rename()
2798 error = xfs_bumplink(tp, dp2); in xfs_cross_rename()
2815 xfs_trans_ichgtime(tp, ip1, ip1_flags); in xfs_cross_rename()
2816 xfs_trans_log_inode(tp, ip1, XFS_ILOG_CORE); in xfs_cross_rename()
2819 xfs_trans_ichgtime(tp, ip2, ip2_flags); in xfs_cross_rename()
2820 xfs_trans_log_inode(tp, ip2, XFS_ILOG_CORE); in xfs_cross_rename()
2823 xfs_trans_ichgtime(tp, dp2, dp2_flags); in xfs_cross_rename()
2824 xfs_trans_log_inode(tp, dp2, XFS_ILOG_CORE); in xfs_cross_rename()
2826 xfs_trans_ichgtime(tp, dp1, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_cross_rename()
2827 xfs_trans_log_inode(tp, dp1, XFS_ILOG_CORE); in xfs_cross_rename()
2828 return xfs_finish_rename(tp); in xfs_cross_rename()
2831 xfs_trans_cancel(tp); in xfs_cross_rename()
2882 struct xfs_trans *tp; in xfs_rename() local
2914 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_rename, spaceres, 0, 0, &tp); in xfs_rename()
2918 &tp); in xfs_rename()
2943 xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL); in xfs_rename()
2945 xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL); in xfs_rename()
2946 xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL); in xfs_rename()
2948 xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL); in xfs_rename()
2950 xfs_trans_ijoin(tp, wip, XFS_ILOCK_EXCL); in xfs_rename()
2965 return xfs_cross_rename(tp, src_dp, src_name, src_ip, in xfs_rename()
2979 error = xfs_dir_canenter(tp, target_dp, target_name); in xfs_rename()
3010 error = xfs_iunlink_remove(tp, wip); in xfs_rename()
3014 xfs_bumplink(tp, wip); in xfs_rename()
3015 xfs_trans_log_inode(tp, wip, XFS_ILOG_CORE); in xfs_rename()
3028 error = xfs_dir_createname(tp, target_dp, target_name, in xfs_rename()
3033 xfs_trans_ichgtime(tp, target_dp, in xfs_rename()
3037 error = xfs_bumplink(tp, target_dp); in xfs_rename()
3051 error = xfs_dir_replace(tp, target_dp, target_name, in xfs_rename()
3056 xfs_trans_ichgtime(tp, target_dp, in xfs_rename()
3063 error = xfs_droplink(tp, target_ip); in xfs_rename()
3071 error = xfs_droplink(tp, target_ip); in xfs_rename()
3085 error = xfs_dir_replace(tp, src_ip, &xfs_name_dotdot, in xfs_rename()
3099 xfs_trans_ichgtime(tp, src_ip, XFS_ICHGTIME_CHG); in xfs_rename()
3100 xfs_trans_log_inode(tp, src_ip, XFS_ILOG_CORE); in xfs_rename()
3113 error = xfs_droplink(tp, src_dp); in xfs_rename()
3124 error = xfs_dir_replace(tp, src_dp, src_name, wip->i_ino, in xfs_rename()
3127 error = xfs_dir_removename(tp, src_dp, src_name, src_ip->i_ino, in xfs_rename()
3132 xfs_trans_ichgtime(tp, src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_rename()
3133 xfs_trans_log_inode(tp, src_dp, XFS_ILOG_CORE); in xfs_rename()
3135 xfs_trans_log_inode(tp, target_dp, XFS_ILOG_CORE); in xfs_rename()
3137 error = xfs_finish_rename(tp); in xfs_rename()
3143 xfs_trans_cancel(tp); in xfs_rename()