Lines Matching refs:tip
1428 struct xfs_inode *tip) /* tmp inode */ in xfs_swap_extents_check_format() argument
1433 tip->i_d.di_format == XFS_DINODE_FMT_LOCAL) in xfs_swap_extents_check_format()
1440 if (ip->i_d.di_nextents < tip->i_d.di_nextents) in xfs_swap_extents_check_format()
1456 tip->i_d.di_format == XFS_DINODE_FMT_BTREE) in xfs_swap_extents_check_format()
1460 if (tip->i_d.di_format == XFS_DINODE_FMT_EXTENTS && in xfs_swap_extents_check_format()
1461 XFS_IFORK_NEXTENTS(tip, XFS_DATA_FORK) > in xfs_swap_extents_check_format()
1468 XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK)) in xfs_swap_extents_check_format()
1480 if (tip->i_d.di_format == XFS_DINODE_FMT_BTREE) { in xfs_swap_extents_check_format()
1482 XFS_BMAP_BMDR_SPACE(tip->i_df.if_broot) > XFS_IFORK_BOFF(ip)) in xfs_swap_extents_check_format()
1484 if (XFS_IFORK_NEXTENTS(tip, XFS_DATA_FORK) <= in xfs_swap_extents_check_format()
1491 if (XFS_IFORK_Q(tip) && in xfs_swap_extents_check_format()
1492 XFS_BMAP_BMDR_SPACE(ip->i_df.if_broot) > XFS_IFORK_BOFF(tip)) in xfs_swap_extents_check_format()
1495 XFS_IFORK_MAXEXT(tip, XFS_DATA_FORK)) in xfs_swap_extents_check_format()
1526 struct xfs_inode *tip) in xfs_swap_extent_rmap() argument
1547 tip_flags2 = tip->i_d.di_flags2; in xfs_swap_extent_rmap()
1549 tip->i_d.di_flags2 |= XFS_DIFLAG2_REFLINK; in xfs_swap_extent_rmap()
1558 error = xfs_bmapi_read(tip, offset_fsb, count_fsb, &tirec, in xfs_swap_extent_rmap()
1565 trace_xfs_swap_extent_rmap_remap(tip, &tirec); in xfs_swap_extent_rmap()
1571 trace_xfs_swap_extent_rmap_remap_piece(tip, &tirec); in xfs_swap_extent_rmap()
1589 trace_xfs_swap_extent_rmap_remap_piece(tip, &uirec); in xfs_swap_extent_rmap()
1592 error = xfs_bmap_unmap_extent(tp, tip, &uirec); in xfs_swap_extent_rmap()
1607 error = xfs_bmap_map_extent(tp, tip, &irec); in xfs_swap_extent_rmap()
1628 tip->i_d.di_flags2 = tip_flags2; in xfs_swap_extent_rmap()
1633 tip->i_d.di_flags2 = tip_flags2; in xfs_swap_extent_rmap()
1642 struct xfs_inode *tip, in xfs_swap_extent_forks() argument
1662 if ( ((XFS_IFORK_Q(tip) != 0) && (tip->i_d.di_anextents > 0)) && in xfs_swap_extent_forks()
1663 (tip->i_d.di_aformat != XFS_DINODE_FMT_LOCAL)) { in xfs_swap_extent_forks()
1664 error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, &junk, in xfs_swap_extent_forks()
1680 if (tip->i_d.di_version == 3 && in xfs_swap_extent_forks()
1681 tip->i_d.di_format == XFS_DINODE_FMT_BTREE) in xfs_swap_extent_forks()
1687 swap(ip->i_df, tip->i_df); in xfs_swap_extent_forks()
1693 ip->i_d.di_nblocks = tip->i_d.di_nblocks - taforkblks + aforkblks; in xfs_swap_extent_forks()
1694 tip->i_d.di_nblocks = tmp + taforkblks - aforkblks; in xfs_swap_extent_forks()
1696 swap(ip->i_d.di_nextents, tip->i_d.di_nextents); in xfs_swap_extent_forks()
1697 swap(ip->i_d.di_format, tip->i_d.di_format); in xfs_swap_extent_forks()
1708 ASSERT(tip->i_delayed_blks == 0); in xfs_swap_extent_forks()
1709 tip->i_delayed_blks = ip->i_delayed_blks; in xfs_swap_extent_forks()
1723 switch (tip->i_d.di_format) { in xfs_swap_extent_forks()
1729 ASSERT(tip->i_d.di_version < 3 || in xfs_swap_extent_forks()
1782 struct xfs_inode *tip, /* tmp inode */ in xfs_swap_extents() argument
1800 lock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents()
1802 xfs_lock_two_inodes(ip, XFS_MMAPLOCK_EXCL, tip, XFS_MMAPLOCK_EXCL); in xfs_swap_extents()
1805 if ((VFS_I(ip)->i_mode & S_IFMT) != (VFS_I(tip)->i_mode & S_IFMT)) { in xfs_swap_extents()
1811 if (XFS_IS_REALTIME_INODE(ip) != XFS_IS_REALTIME_INODE(tip)) { in xfs_swap_extents()
1819 error = xfs_swap_extent_flush(tip); in xfs_swap_extents()
1823 if (xfs_inode_has_cow_data(tip)) { in xfs_swap_extents()
1824 error = xfs_reflink_cancel_cow_range(tip, 0, NULLFILEOFF, true); in xfs_swap_extents()
1837 uint32_t tipnext = XFS_IFORK_NEXTENTS(tip, w); in xfs_swap_extents()
1855 if (tipnext == (XFS_IFORK_MAXEXT(tip, w) + 1)) in xfs_swap_extents()
1856 resblks += XFS_IFORK_MAXEXT(tip, w); in xfs_swap_extents()
1866 xfs_lock_two_inodes(ip, XFS_ILOCK_EXCL, tip, XFS_ILOCK_EXCL); in xfs_swap_extents()
1869 xfs_trans_ijoin(tp, tip, 0); in xfs_swap_extents()
1875 sxp->sx_length != tip->i_d.di_size) { in xfs_swap_extents()
1881 trace_xfs_swap_extent_before(tip, 1); in xfs_swap_extents()
1884 error = xfs_swap_extents_check_format(ip, tip); in xfs_swap_extents()
1918 error = xfs_swap_extent_rmap(&tp, ip, tip); in xfs_swap_extents()
1920 error = xfs_swap_extent_forks(tp, ip, tip, &src_log_flags, in xfs_swap_extents()
1927 (tip->i_d.di_flags2 & XFS_DIFLAG2_REFLINK)) { in xfs_swap_extents()
1930 ip->i_d.di_flags2 |= tip->i_d.di_flags2 & XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1931 tip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1932 tip->i_d.di_flags2 |= f & XFS_DIFLAG2_REFLINK; in xfs_swap_extents()
1938 ASSERT(tip->i_cformat == XFS_DINODE_FMT_EXTENTS); in xfs_swap_extents()
1940 swap(ip->i_cnextents, tip->i_cnextents); in xfs_swap_extents()
1941 swap(ip->i_cowfp, tip->i_cowfp); in xfs_swap_extents()
1947 if (tip->i_cowfp && tip->i_cowfp->if_bytes) in xfs_swap_extents()
1948 xfs_inode_set_cowblocks_tag(tip); in xfs_swap_extents()
1950 xfs_inode_clear_cowblocks_tag(tip); in xfs_swap_extents()
1954 xfs_trans_log_inode(tp, tip, target_log_flags); in xfs_swap_extents()
1963 error = xfs_swap_change_owner(&tp, ip, tip); in xfs_swap_extents()
1968 error = xfs_swap_change_owner(&tp, tip, ip); in xfs_swap_extents()
1983 trace_xfs_swap_extent_after(tip, 1); in xfs_swap_extents()
1987 xfs_iunlock(tip, lock_flags); in xfs_swap_extents()
1988 unlock_two_nondirectories(VFS_I(ip), VFS_I(tip)); in xfs_swap_extents()