Lines Matching full:tip
1131 struct xfs_inode *tip) /* tmp inode */ in xfs_swap_extents_check_format() argument
1134 struct xfs_ifork *tifp = &tip->i_df; in xfs_swap_extents_check_format()
1138 (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) || in xfs_swap_extents_check_format()
1139 !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) || in xfs_swap_extents_check_format()
1140 ip->i_projid != tip->i_projid)) in xfs_swap_extents_check_format()
1178 ifp->if_nextents > XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK)) in xfs_swap_extents_check_format()
1200 if (xfs_inode_has_attr_fork(tip) && in xfs_swap_extents_check_format()
1201 xfs_bmap_bmdr_space(ip->i_df.if_broot) > xfs_inode_fork_boff(tip)) in xfs_swap_extents_check_format()
1203 if (ifp->if_nextents <= XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK)) in xfs_swap_extents_check_format()
1234 struct xfs_inode *tip) in xfs_swap_extent_rmap() argument
1255 tip_flags2 = tip->i_diflags2; in xfs_swap_extent_rmap()
1257 tip->i_diflags2 |= XFS_DIFLAG2_REFLINK; in xfs_swap_extent_rmap()
1266 error = xfs_bmapi_read(tip, offset_fsb, count_fsb, &tirec, in xfs_swap_extent_rmap()
1273 trace_xfs_swap_extent_rmap_remap(tip, &tirec); in xfs_swap_extent_rmap()
1279 trace_xfs_swap_extent_rmap_remap_piece(tip, &tirec); in xfs_swap_extent_rmap()
1297 trace_xfs_swap_extent_rmap_remap_piece(tip, &uirec); in xfs_swap_extent_rmap()
1308 error = xfs_iext_count_extend(tp, tip, in xfs_swap_extent_rmap()
1316 xfs_bmap_unmap_extent(tp, tip, XFS_DATA_FORK, &uirec); in xfs_swap_extent_rmap()
1325 xfs_bmap_map_extent(tp, tip, XFS_DATA_FORK, &irec); in xfs_swap_extent_rmap()
1344 tip->i_diflags2 = tip_flags2; in xfs_swap_extent_rmap()
1349 tip->i_diflags2 = tip_flags2; in xfs_swap_extent_rmap()
1358 struct xfs_inode *tip, in xfs_swap_extent_forks() argument
1378 if (xfs_inode_has_attr_fork(tip) && tip->i_af.if_nextents > 0 && in xfs_swap_extent_forks()
1379 tip->i_af.if_format != XFS_DINODE_FMT_LOCAL) { in xfs_swap_extent_forks()
1380 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, &junk, in xfs_swap_extent_forks()
1396 if (tip->i_df.if_format == XFS_DINODE_FMT_BTREE) in xfs_swap_extent_forks()
1403 swap(ip->i_df, tip->i_df); in xfs_swap_extent_forks()
1409 ip->i_nblocks = tip->i_nblocks - taforkblks + aforkblks; in xfs_swap_extent_forks()
1410 tip->i_nblocks = tmp + taforkblks - aforkblks; in xfs_swap_extent_forks()
1421 ASSERT(tip->i_delayed_blks == 0); in xfs_swap_extent_forks()
1422 tip->i_delayed_blks = ip->i_delayed_blks; in xfs_swap_extent_forks()
1436 switch (tip->i_df.if_format) { in xfs_swap_extent_forks()
1495 struct xfs_inode *tip, /* tmp inode */ in xfs_swap_extents() argument
1514 lock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents()
1516 VFS_I(tip)->i_mapping); in xfs_swap_extents()
1519 if ((VFS_I(ip)->i_mode & S_IFMT) != (VFS_I(tip)->i_mode & S_IFMT)) { in xfs_swap_extents()
1525 if (XFS_IS_REALTIME_INODE(ip) != XFS_IS_REALTIME_INODE(tip)) { in xfs_swap_extents()
1534 error = xfs_qm_dqattach(tip); in xfs_swap_extents()
1541 error = xfs_swap_extent_flush(tip); in xfs_swap_extents()
1545 if (xfs_inode_has_cow_data(tip)) { in xfs_swap_extents()
1546 error = xfs_reflink_cancel_cow_range(tip, 0, NULLFILEOFF, true); in xfs_swap_extents()
1559 uint32_t tipnext = tip->i_df.if_nextents; in xfs_swap_extents()
1587 xfs_lock_two_inodes(ip, XFS_ILOCK_EXCL, tip, XFS_ILOCK_EXCL); in xfs_swap_extents()
1589 xfs_trans_ijoin(tp, tip, 0); in xfs_swap_extents()
1595 sxp->sx_length != tip->i_disk_size) { in xfs_swap_extents()
1601 trace_xfs_swap_extent_before(tip, 1); in xfs_swap_extents()
1604 error = xfs_swap_extents_check_format(ip, tip); in xfs_swap_extents()
1640 error = xfs_swap_extent_rmap(&tp, ip, tip); in xfs_swap_extents()
1642 error = xfs_swap_extent_forks(tp, ip, tip, &src_log_flags, in xfs_swap_extents()
1649 (tip->i_diflags2 & XFS_DIFLAG2_REFLINK)) { in xfs_swap_extents()
1652 ip->i_diflags2 |= tip->i_diflags2 & XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1653 tip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1654 tip->i_diflags2 |= f & XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1661 ASSERT(!tip->i_cowfp || in xfs_swap_extents()
1662 tip->i_cowfp->if_format == XFS_DINODE_FMT_EXTENTS); in xfs_swap_extents()
1664 swap(ip->i_cowfp, tip->i_cowfp); in xfs_swap_extents()
1670 if (tip->i_cowfp && tip->i_cowfp->if_bytes) in xfs_swap_extents()
1671 xfs_inode_set_cowblocks_tag(tip); in xfs_swap_extents()
1673 xfs_inode_clear_cowblocks_tag(tip); in xfs_swap_extents()
1677 xfs_trans_log_inode(tp, tip, target_log_flags); in xfs_swap_extents()
1686 error = xfs_swap_change_owner(&tp, ip, tip); in xfs_swap_extents()
1691 error = xfs_swap_change_owner(&tp, tip, ip); in xfs_swap_extents()
1706 trace_xfs_swap_extent_after(tip, 1); in xfs_swap_extents()
1710 xfs_iunlock(tip, XFS_ILOCK_EXCL); in xfs_swap_extents()
1713 VFS_I(tip)->i_mapping); in xfs_swap_extents()
1714 unlock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents()