Lines Matching refs:tp
693 xfs_trans_t *tp, in xfs_ialloc() argument
703 struct xfs_mount *mp = tp->t_mountp; in xfs_ialloc()
714 error = xfs_dialloc(tp, pip ? pip->i_ino : 0, mode, okalloc, in xfs_ialloc()
729 error = xfs_iget(mp, tp, ino, XFS_IGET_CREATE, in xfs_ialloc()
871 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_ialloc()
872 xfs_trans_log_inode(tp, ip, flags); in xfs_ialloc()
907 xfs_trans_t *tp; in xfs_dir_ialloc() local
915 tp = *tpp; in xfs_dir_ialloc()
916 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_dir_ialloc()
933 code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, okalloc, in xfs_dir_ialloc()
966 xfs_trans_bhold(tp, ialloc_context); in xfs_dir_ialloc()
971 tres.tr_logres = xfs_trans_get_log_res(tp); in xfs_dir_ialloc()
972 tres.tr_logcount = xfs_trans_get_log_count(tp); in xfs_dir_ialloc()
981 if (tp->t_dqinfo) { in xfs_dir_ialloc()
982 dqinfo = (void *)tp->t_dqinfo; in xfs_dir_ialloc()
983 tp->t_dqinfo = NULL; in xfs_dir_ialloc()
984 tflags = tp->t_flags & XFS_TRANS_DQ_DIRTY; in xfs_dir_ialloc()
985 tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY); in xfs_dir_ialloc()
988 ntp = xfs_trans_dup(tp); in xfs_dir_ialloc()
989 code = xfs_trans_commit(tp, 0); in xfs_dir_ialloc()
990 tp = ntp; in xfs_dir_ialloc()
1002 tp->t_dqinfo = dqinfo; in xfs_dir_ialloc()
1003 xfs_trans_free_dqinfo(tp); in xfs_dir_ialloc()
1014 xfs_log_ticket_put(tp->t_ticket); in xfs_dir_ialloc()
1016 code = xfs_trans_reserve(tp, &tres, 0, 0); in xfs_dir_ialloc()
1022 tp->t_dqinfo = dqinfo; in xfs_dir_ialloc()
1023 tp->t_flags |= tflags; in xfs_dir_ialloc()
1032 xfs_trans_bjoin(tp, ialloc_context); in xfs_dir_ialloc()
1039 code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, in xfs_dir_ialloc()
1047 *tpp = tp; in xfs_dir_ialloc()
1059 *tpp = tp; in xfs_dir_ialloc()
1071 xfs_trans_t *tp, in xfs_droplink() argument
1076 xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); in xfs_droplink()
1081 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_droplink()
1091 error = xfs_iunlink(tp, ip); in xfs_droplink()
1101 xfs_trans_t *tp, in xfs_bumplink() argument
1104 xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); in xfs_bumplink()
1110 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_bumplink()
1125 struct xfs_trans *tp = NULL; in xfs_create() local
1160 tp = xfs_trans_alloc(mp, XFS_TRANS_MKDIR); in xfs_create()
1164 tp = xfs_trans_alloc(mp, XFS_TRANS_CREATE); in xfs_create()
1175 error = xfs_trans_reserve(tp, tres, resblks, 0); in xfs_create()
1179 error = xfs_trans_reserve(tp, tres, resblks, 0); in xfs_create()
1184 error = xfs_trans_reserve(tp, tres, 0, 0); in xfs_create()
1199 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create()
1205 error = xfs_dir_canenter(tp, dp, name); in xfs_create()
1215 error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev, in xfs_create()
1230 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); in xfs_create()
1233 error = xfs_dir_createname(tp, dp, name, ip->i_ino, in xfs_create()
1240 xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_create()
1241 xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); in xfs_create()
1244 error = xfs_dir_init(tp, ip, dp); in xfs_create()
1248 error = xfs_bumplink(tp, dp); in xfs_create()
1259 xfs_trans_set_sync(tp); in xfs_create()
1266 xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); in xfs_create()
1268 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_create()
1272 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_create()
1288 xfs_trans_cancel(tp, cancel_flags); in xfs_create()
1318 struct xfs_trans *tp = NULL; in xfs_create_tmpfile() local
1344 tp = xfs_trans_alloc(mp, XFS_TRANS_CREATE_TMPFILE); in xfs_create_tmpfile()
1347 error = xfs_trans_reserve(tp, tres, resblks, 0); in xfs_create_tmpfile()
1351 error = xfs_trans_reserve(tp, tres, 0, 0); in xfs_create_tmpfile()
1358 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create_tmpfile()
1363 error = xfs_dir_ialloc(&tp, dp, mode, 1, 0, in xfs_create_tmpfile()
1372 xfs_trans_set_sync(tp); in xfs_create_tmpfile()
1379 xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); in xfs_create_tmpfile()
1382 error = xfs_iunlink(tp, ip); in xfs_create_tmpfile()
1386 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_create_tmpfile()
1400 xfs_trans_cancel(tp, cancel_flags); in xfs_create_tmpfile()
1426 xfs_trans_t *tp; in xfs_link() local
1449 tp = xfs_trans_alloc(mp, XFS_TRANS_LINK); in xfs_link()
1452 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_link, resblks, 0); in xfs_link()
1455 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_link, 0, 0); in xfs_link()
1464 xfs_trans_ijoin(tp, sip, XFS_ILOCK_EXCL); in xfs_link()
1465 xfs_trans_ijoin(tp, tdp, XFS_ILOCK_EXCL); in xfs_link()
1479 error = xfs_dir_canenter(tp, tdp, target_name); in xfs_link()
1487 error = xfs_iunlink_remove(tp, sip); in xfs_link()
1492 error = xfs_dir_createname(tp, tdp, target_name, sip->i_ino, in xfs_link()
1496 xfs_trans_ichgtime(tp, tdp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_link()
1497 xfs_trans_log_inode(tp, tdp, XFS_ILOG_CORE); in xfs_link()
1499 error = xfs_bumplink(tp, sip); in xfs_link()
1509 xfs_trans_set_sync(tp); in xfs_link()
1512 error = xfs_bmap_finish (&tp, &free_list, &committed); in xfs_link()
1518 return xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_link()
1523 xfs_trans_cancel(tp, cancel_flags); in xfs_link()
1557 struct xfs_trans *tp = *tpp; in xfs_itruncate_extents() local
1572 ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); in xfs_itruncate_extents()
1597 error = xfs_bunmapi(tp, ip, in xfs_itruncate_extents()
1610 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_itruncate_extents()
1612 xfs_trans_ijoin(tp, ip, 0); in xfs_itruncate_extents()
1621 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_itruncate_extents()
1624 ntp = xfs_trans_dup(tp); in xfs_itruncate_extents()
1625 error = xfs_trans_commit(tp, 0); in xfs_itruncate_extents()
1626 tp = ntp; in xfs_itruncate_extents()
1628 xfs_trans_ijoin(tp, ip, 0); in xfs_itruncate_extents()
1637 xfs_log_ticket_put(tp->t_ticket); in xfs_itruncate_extents()
1638 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_itruncate, 0, 0); in xfs_itruncate_extents()
1647 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_itruncate_extents()
1652 *tpp = tp; in xfs_itruncate_extents()
1752 struct xfs_trans *tp; in xfs_inactive_truncate() local
1755 tp = xfs_trans_alloc(mp, XFS_TRANS_INACTIVE); in xfs_inactive_truncate()
1756 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_itruncate, 0, 0); in xfs_inactive_truncate()
1759 xfs_trans_cancel(tp, 0); in xfs_inactive_truncate()
1764 xfs_trans_ijoin(tp, ip, 0); in xfs_inactive_truncate()
1772 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_inactive_truncate()
1774 error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, 0); in xfs_inactive_truncate()
1780 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_inactive_truncate()
1788 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT); in xfs_inactive_truncate()
1807 struct xfs_trans *tp; in xfs_inactive_ifree() local
1810 tp = xfs_trans_alloc(mp, XFS_TRANS_INACTIVE); in xfs_inactive_ifree()
1827 tp->t_flags |= XFS_TRANS_RESERVE; in xfs_inactive_ifree()
1828 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_ifree, in xfs_inactive_ifree()
1838 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_inactive_ifree()
1843 xfs_trans_ijoin(tp, ip, 0); in xfs_inactive_ifree()
1846 error = xfs_ifree(tp, ip, &free_list); in xfs_inactive_ifree()
1858 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT); in xfs_inactive_ifree()
1866 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_ICOUNT, -1); in xfs_inactive_ifree()
1873 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_inactive_ifree()
1877 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_inactive_ifree()
1981 xfs_trans_t *tp, in xfs_iunlink() argument
1997 mp = tp->t_mountp; in xfs_iunlink()
2003 error = xfs_read_agi(mp, tp, XFS_INO_TO_AGNO(mp, ip->i_ino), &agibp); in xfs_iunlink()
2025 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink()
2038 xfs_trans_inode_buf(tp, ibp); in xfs_iunlink()
2039 xfs_trans_log_buf(tp, ibp, offset, in xfs_iunlink()
2051 xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF); in xfs_iunlink()
2052 xfs_trans_log_buf(tp, agibp, offset, in xfs_iunlink()
2062 xfs_trans_t *tp, in xfs_iunlink_remove() argument
2080 mp = tp->t_mountp; in xfs_iunlink_remove()
2087 error = xfs_read_agi(mp, tp, agno, &agibp); in xfs_iunlink_remove()
2111 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2128 xfs_trans_inode_buf(tp, ibp); in xfs_iunlink_remove()
2129 xfs_trans_log_buf(tp, ibp, offset, in xfs_iunlink_remove()
2133 xfs_trans_brelse(tp, ibp); in xfs_iunlink_remove()
2143 xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF); in xfs_iunlink_remove()
2144 xfs_trans_log_buf(tp, agibp, offset, in xfs_iunlink_remove()
2156 xfs_trans_brelse(tp, last_ibp); in xfs_iunlink_remove()
2161 error = xfs_imap(mp, tp, next_ino, &imap, 0); in xfs_iunlink_remove()
2169 error = xfs_imap_to_bp(mp, tp, &imap, &last_dip, in xfs_iunlink_remove()
2188 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2206 xfs_trans_inode_buf(tp, ibp); in xfs_iunlink_remove()
2207 xfs_trans_log_buf(tp, ibp, offset, in xfs_iunlink_remove()
2211 xfs_trans_brelse(tp, ibp); in xfs_iunlink_remove()
2223 xfs_trans_inode_buf(tp, last_ibp); in xfs_iunlink_remove()
2224 xfs_trans_log_buf(tp, last_ibp, offset, in xfs_iunlink_remove()
2239 xfs_trans_t *tp, in xfs_ifree_cluster() argument
2271 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, in xfs_ifree_cluster()
2392 xfs_trans_stale_inode_buf(tp, bp); in xfs_ifree_cluster()
2393 xfs_trans_binval(tp, bp); in xfs_ifree_cluster()
2412 xfs_trans_t *tp, in xfs_ifree() argument
2430 error = xfs_iunlink_remove(tp, ip); in xfs_ifree()
2434 error = xfs_difree(tp, ip->i_ino, flist, &delete, &first_ino); in xfs_ifree()
2449 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_ifree()
2452 error = xfs_ifree_cluster(ip, tp, first_ino); in xfs_ifree()
2534 xfs_trans_t *tp = NULL; in xfs_remove() local
2557 tp = xfs_trans_alloc(mp, XFS_TRANS_RMDIR); in xfs_remove()
2559 tp = xfs_trans_alloc(mp, XFS_TRANS_REMOVE); in xfs_remove()
2572 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_remove, resblks, 0); in xfs_remove()
2575 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_remove, 0, 0); in xfs_remove()
2585 xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); in xfs_remove()
2586 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_remove()
2604 error = xfs_droplink(tp, dp); in xfs_remove()
2609 error = xfs_droplink(tp, ip); in xfs_remove()
2618 xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); in xfs_remove()
2620 xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_remove()
2623 error = xfs_droplink(tp, ip); in xfs_remove()
2628 error = xfs_dir_removename(tp, dp, name, ip->i_ino, in xfs_remove()
2641 xfs_trans_set_sync(tp); in xfs_remove()
2643 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_remove()
2647 error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_remove()
2659 xfs_trans_cancel(tp, cancel_flags); in xfs_remove()
2717 struct xfs_trans *tp, in xfs_finish_rename() argument
2727 if (tp->t_mountp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) in xfs_finish_rename()
2728 xfs_trans_set_sync(tp); in xfs_finish_rename()
2730 error = xfs_bmap_finish(&tp, free_list, &committed); in xfs_finish_rename()
2733 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT); in xfs_finish_rename()
2737 return xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); in xfs_finish_rename()
2747 struct xfs_trans *tp, in xfs_cross_rename() argument
2764 error = xfs_dir_replace(tp, dp1, name1, in xfs_cross_rename()
2771 error = xfs_dir_replace(tp, dp2, name2, in xfs_cross_rename()
2786 error = xfs_dir_replace(tp, ip2, &xfs_name_dotdot, in xfs_cross_rename()
2794 error = xfs_droplink(tp, dp2); in xfs_cross_rename()
2797 error = xfs_bumplink(tp, dp1); in xfs_cross_rename()
2813 error = xfs_dir_replace(tp, ip1, &xfs_name_dotdot, in xfs_cross_rename()
2821 error = xfs_droplink(tp, dp1); in xfs_cross_rename()
2824 error = xfs_bumplink(tp, dp2); in xfs_cross_rename()
2841 xfs_trans_ichgtime(tp, ip1, ip1_flags); in xfs_cross_rename()
2842 xfs_trans_log_inode(tp, ip1, XFS_ILOG_CORE); in xfs_cross_rename()
2845 xfs_trans_ichgtime(tp, ip2, ip2_flags); in xfs_cross_rename()
2846 xfs_trans_log_inode(tp, ip2, XFS_ILOG_CORE); in xfs_cross_rename()
2849 xfs_trans_ichgtime(tp, dp2, dp2_flags); in xfs_cross_rename()
2850 xfs_trans_log_inode(tp, dp2, XFS_ILOG_CORE); in xfs_cross_rename()
2852 xfs_trans_ichgtime(tp, dp1, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_cross_rename()
2853 xfs_trans_log_inode(tp, dp1, XFS_ILOG_CORE); in xfs_cross_rename()
2854 return xfs_finish_rename(tp, free_list); in xfs_cross_rename()
2858 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT); in xfs_cross_rename()
2910 struct xfs_trans *tp; in xfs_rename() local
2945 tp = xfs_trans_alloc(mp, XFS_TRANS_RENAME); in xfs_rename()
2947 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_rename, spaceres, 0); in xfs_rename()
2950 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_rename, 0, 0); in xfs_rename()
2976 xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL); in xfs_rename()
2978 xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL); in xfs_rename()
2979 xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL); in xfs_rename()
2981 xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL); in xfs_rename()
2983 xfs_trans_ijoin(tp, wip, XFS_ILOCK_EXCL); in xfs_rename()
3000 return xfs_cross_rename(tp, src_dp, src_name, src_ip, in xfs_rename()
3013 error = xfs_dir_canenter(tp, target_dp, target_name); in xfs_rename()
3022 error = xfs_dir_createname(tp, target_dp, target_name, in xfs_rename()
3030 xfs_trans_ichgtime(tp, target_dp, in xfs_rename()
3034 error = xfs_bumplink(tp, target_dp); in xfs_rename()
3064 error = xfs_dir_replace(tp, target_dp, target_name, in xfs_rename()
3070 xfs_trans_ichgtime(tp, target_dp, in xfs_rename()
3077 error = xfs_droplink(tp, target_ip); in xfs_rename()
3085 error = xfs_droplink(tp, target_ip); in xfs_rename()
3099 error = xfs_dir_replace(tp, src_ip, &xfs_name_dotdot, in xfs_rename()
3114 xfs_trans_ichgtime(tp, src_ip, XFS_ICHGTIME_CHG); in xfs_rename()
3115 xfs_trans_log_inode(tp, src_ip, XFS_ILOG_CORE); in xfs_rename()
3128 error = xfs_droplink(tp, src_dp); in xfs_rename()
3139 error = xfs_dir_replace(tp, src_dp, src_name, wip->i_ino, in xfs_rename()
3142 error = xfs_dir_removename(tp, src_dp, src_name, src_ip->i_ino, in xfs_rename()
3157 error = xfs_bumplink(tp, wip); in xfs_rename()
3160 error = xfs_iunlink_remove(tp, wip); in xfs_rename()
3163 xfs_trans_log_inode(tp, wip, XFS_ILOG_CORE); in xfs_rename()
3173 xfs_trans_ichgtime(tp, src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_rename()
3174 xfs_trans_log_inode(tp, src_dp, XFS_ILOG_CORE); in xfs_rename()
3176 xfs_trans_log_inode(tp, target_dp, XFS_ILOG_CORE); in xfs_rename()
3178 error = xfs_finish_rename(tp, &free_list); in xfs_rename()
3188 xfs_trans_cancel(tp, cancel_flags); in xfs_rename()