Lines Matching refs:ip1
31 struct xfs_inode *ip1, in xfs_exchrange_ilock() argument
34 if (ip1 != ip2) in xfs_exchrange_ilock()
35 xfs_lock_two_inodes(ip1, XFS_ILOCK_EXCL, in xfs_exchrange_ilock()
38 xfs_ilock(ip1, XFS_ILOCK_EXCL); in xfs_exchrange_ilock()
40 xfs_trans_ijoin(tp, ip1, 0); in xfs_exchrange_ilock()
41 if (ip2 != ip1) in xfs_exchrange_ilock()
50 struct xfs_inode *ip1, in xfs_exchrange_iunlock() argument
53 if (ip2 != ip1) in xfs_exchrange_iunlock()
55 xfs_iunlock(ip1, XFS_ILOCK_EXCL); in xfs_exchrange_iunlock()
69 xfs_exchrange_ilock(NULL, req->ip1, req->ip2); in xfs_exchrange_estimate()
71 xfs_exchrange_iunlock(req->ip1, req->ip2); in xfs_exchrange_estimate()
126 if (!XFS_IS_QUOTA_ON(tp->t_mountp) || req->ip1 == req->ip2 || in xfs_exchrange_reserve_quota()
127 (req->ip1->i_udquot == req->ip2->i_udquot && in xfs_exchrange_reserve_quota()
128 req->ip1->i_gdquot == req->ip2->i_gdquot && in xfs_exchrange_reserve_quota()
129 req->ip1->i_pdquot == req->ip2->i_pdquot)) in xfs_exchrange_reserve_quota()
142 error = xfs_trans_reserve_quota_nblks(tp, req->ip1, in xfs_exchrange_reserve_quota()
178 error = xfs_trans_reserve_quota_nblks(tp, req->ip1, req->ip1_bcount, in xfs_exchrange_reserve_quota()
191 struct xfs_inode *ip1, in xfs_exchrange_mappings() argument
194 struct xfs_mount *mp = ip1->i_mount; in xfs_exchrange_mappings()
196 .ip1 = ip1, in xfs_exchrange_mappings()
207 trace_xfs_exchrange_mappings(fxr, ip1, ip2); in xfs_exchrange_mappings()
233 xfs_exchrange_ilock(tp, ip1, ip2); in xfs_exchrange_mappings()
236 trace_xfs_exchrange_before(ip1, 1); in xfs_exchrange_mappings()
250 xfs_exchrange_iunlock(ip1, ip2); in xfs_exchrange_mappings()
252 xfs_blockgc_free_quota(ip1, 0); in xfs_exchrange_mappings()
267 xfs_trans_ichgtime(tp, ip1, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_exchrange_mappings()
284 trace_xfs_exchrange_after(ip1, 1); in xfs_exchrange_mappings()
299 i_size_write(VFS_I(ip2), i_size_read(VFS_I(ip1))); in xfs_exchrange_mappings()
300 i_size_write(VFS_I(ip1), temp); in xfs_exchrange_mappings()
304 xfs_exchrange_iunlock(ip1, ip2); in xfs_exchrange_mappings()
543 struct xfs_inode *ip1, in xfs_exchrange_check_rtalign() argument
551 size1 = i_size_read(VFS_I(ip1)); in xfs_exchrange_check_rtalign()
582 if (ip1 == ip2 && in xfs_exchrange_check_rtalign()
608 struct xfs_inode *ip1, in xfs_exchrange_prep() argument
615 trace_xfs_exchrange_prep(fxr, ip1, ip2); in xfs_exchrange_prep()
618 if (XFS_IS_REALTIME_INODE(ip1) != XFS_IS_REALTIME_INODE(ip2)) in xfs_exchrange_prep()
623 error = xfs_exchrange_check_rtalign(fxr, ip1, ip2, alloc_unit); in xfs_exchrange_prep()
648 error = xfs_qm_dqattach(ip1); in xfs_exchrange_prep()
652 trace_xfs_exchrange_flush(fxr, ip1, ip2); in xfs_exchrange_prep()
658 error = xfs_flush_unmap_range(ip1, fxr->file1_offset, fxr->length); in xfs_exchrange_prep()
667 if (xfs_inode_has_cow_data(ip1)) { in xfs_exchrange_prep()
668 error = xfs_reflink_cancel_cow_range(ip1, fxr->file1_offset, in xfs_exchrange_prep()
694 struct xfs_inode *ip1 = XFS_I(inode1); in xfs_exchrange_contents() local
696 struct xfs_mount *mp = ip1->i_mount; in xfs_exchrange_contents()
710 error = xfs_ilock2_io_mmap(ip1, ip2); in xfs_exchrange_contents()
715 error = xfs_exchrange_prep(fxr, ip1, ip2); in xfs_exchrange_contents()
719 error = xfs_exchrange_mappings(fxr, ip1, ip2); in xfs_exchrange_contents()
733 xfs_iunlock2_io_mmap(ip1, ip2); in xfs_exchrange_contents()