Lines Matching refs:tip
1264 struct xfs_inode *tip) /* tmp inode */ in xfs_swap_extents_check_format() argument
1267 struct xfs_ifork *tifp = &tip->i_df; in xfs_swap_extents_check_format()
1271 (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) || in xfs_swap_extents_check_format()
1272 !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) || in xfs_swap_extents_check_format()
1273 ip->i_projid != tip->i_projid)) in xfs_swap_extents_check_format()
1311 ifp->if_nextents > XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK)) in xfs_swap_extents_check_format()
1333 if (xfs_inode_has_attr_fork(tip) && in xfs_swap_extents_check_format()
1334 XFS_BMAP_BMDR_SPACE(ip->i_df.if_broot) > xfs_inode_fork_boff(tip)) in xfs_swap_extents_check_format()
1336 if (ifp->if_nextents <= XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK)) in xfs_swap_extents_check_format()
1367 struct xfs_inode *tip) in xfs_swap_extent_rmap() argument
1388 tip_flags2 = tip->i_diflags2; in xfs_swap_extent_rmap()
1390 tip->i_diflags2 |= XFS_DIFLAG2_REFLINK; in xfs_swap_extent_rmap()
1399 error = xfs_bmapi_read(tip, offset_fsb, count_fsb, &tirec, in xfs_swap_extent_rmap()
1406 trace_xfs_swap_extent_rmap_remap(tip, &tirec); in xfs_swap_extent_rmap()
1412 trace_xfs_swap_extent_rmap_remap_piece(tip, &tirec); in xfs_swap_extent_rmap()
1430 trace_xfs_swap_extent_rmap_remap_piece(tip, &uirec); in xfs_swap_extent_rmap()
1444 error = xfs_iext_count_may_overflow(tip, in xfs_swap_extent_rmap()
1455 xfs_bmap_unmap_extent(tp, tip, &uirec); in xfs_swap_extent_rmap()
1464 xfs_bmap_map_extent(tp, tip, &irec); in xfs_swap_extent_rmap()
1483 tip->i_diflags2 = tip_flags2; in xfs_swap_extent_rmap()
1488 tip->i_diflags2 = tip_flags2; in xfs_swap_extent_rmap()
1497 struct xfs_inode *tip, in xfs_swap_extent_forks() argument
1517 if (xfs_inode_has_attr_fork(tip) && tip->i_af.if_nextents > 0 && in xfs_swap_extent_forks()
1518 tip->i_af.if_format != XFS_DINODE_FMT_LOCAL) { in xfs_swap_extent_forks()
1519 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, &junk, in xfs_swap_extent_forks()
1535 if (tip->i_df.if_format == XFS_DINODE_FMT_BTREE) in xfs_swap_extent_forks()
1542 swap(ip->i_df, tip->i_df); in xfs_swap_extent_forks()
1548 ip->i_nblocks = tip->i_nblocks - taforkblks + aforkblks; in xfs_swap_extent_forks()
1549 tip->i_nblocks = tmp + taforkblks - aforkblks; in xfs_swap_extent_forks()
1560 ASSERT(tip->i_delayed_blks == 0); in xfs_swap_extent_forks()
1561 tip->i_delayed_blks = ip->i_delayed_blks; in xfs_swap_extent_forks()
1575 switch (tip->i_df.if_format) { in xfs_swap_extent_forks()
1634 struct xfs_inode *tip, /* tmp inode */ in xfs_swap_extents() argument
1652 lock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents()
1654 VFS_I(tip)->i_mapping); in xfs_swap_extents()
1657 if ((VFS_I(ip)->i_mode & S_IFMT) != (VFS_I(tip)->i_mode & S_IFMT)) { in xfs_swap_extents()
1663 if (XFS_IS_REALTIME_INODE(ip) != XFS_IS_REALTIME_INODE(tip)) { in xfs_swap_extents()
1672 error = xfs_qm_dqattach(tip); in xfs_swap_extents()
1679 error = xfs_swap_extent_flush(tip); in xfs_swap_extents()
1683 if (xfs_inode_has_cow_data(tip)) { in xfs_swap_extents()
1684 error = xfs_reflink_cancel_cow_range(tip, 0, NULLFILEOFF, true); in xfs_swap_extents()
1697 uint32_t tipnext = tip->i_df.if_nextents; in xfs_swap_extents()
1725 xfs_lock_two_inodes(ip, XFS_ILOCK_EXCL, tip, XFS_ILOCK_EXCL); in xfs_swap_extents()
1727 xfs_trans_ijoin(tp, tip, 0); in xfs_swap_extents()
1733 sxp->sx_length != tip->i_disk_size) { in xfs_swap_extents()
1739 trace_xfs_swap_extent_before(tip, 1); in xfs_swap_extents()
1742 error = xfs_swap_extents_check_format(ip, tip); in xfs_swap_extents()
1776 error = xfs_swap_extent_rmap(&tp, ip, tip); in xfs_swap_extents()
1778 error = xfs_swap_extent_forks(tp, ip, tip, &src_log_flags, in xfs_swap_extents()
1785 (tip->i_diflags2 & XFS_DIFLAG2_REFLINK)) { in xfs_swap_extents()
1788 ip->i_diflags2 |= tip->i_diflags2 & XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1789 tip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1790 tip->i_diflags2 |= f & XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1797 ASSERT(!tip->i_cowfp || in xfs_swap_extents()
1798 tip->i_cowfp->if_format == XFS_DINODE_FMT_EXTENTS); in xfs_swap_extents()
1800 swap(ip->i_cowfp, tip->i_cowfp); in xfs_swap_extents()
1806 if (tip->i_cowfp && tip->i_cowfp->if_bytes) in xfs_swap_extents()
1807 xfs_inode_set_cowblocks_tag(tip); in xfs_swap_extents()
1809 xfs_inode_clear_cowblocks_tag(tip); in xfs_swap_extents()
1813 xfs_trans_log_inode(tp, tip, target_log_flags); in xfs_swap_extents()
1822 error = xfs_swap_change_owner(&tp, ip, tip); in xfs_swap_extents()
1827 error = xfs_swap_change_owner(&tp, tip, ip); in xfs_swap_extents()
1842 trace_xfs_swap_extent_after(tip, 1); in xfs_swap_extents()
1846 xfs_iunlock(tip, XFS_ILOCK_EXCL); in xfs_swap_extents()
1849 VFS_I(tip)->i_mapping); in xfs_swap_extents()
1850 unlock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents()