Lines Matching refs:ip2
32 struct xfs_inode *ip2) in xfs_exchrange_ilock() argument
34 if (ip1 != ip2) in xfs_exchrange_ilock()
36 ip2, XFS_ILOCK_EXCL); in xfs_exchrange_ilock()
41 if (ip2 != ip1) in xfs_exchrange_ilock()
42 xfs_trans_ijoin(tp, ip2, 0); in xfs_exchrange_ilock()
51 struct xfs_inode *ip2) in xfs_exchrange_iunlock() argument
53 if (ip2 != ip1) in xfs_exchrange_iunlock()
54 xfs_iunlock(ip2, 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()
85 struct xfs_inode *ip2) in xfs_exchrange_check_freshness() argument
87 struct inode *inode2 = VFS_I(ip2); in xfs_exchrange_check_freshness()
91 trace_xfs_exchrange_freshness(fxr, ip2); in xfs_exchrange_check_freshness()
94 if (fxr->file2_ino != ip2->i_ino || in xfs_exchrange_check_freshness()
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()
159 error = xfs_trans_reserve_quota_nblks(tp, req->ip2, in xfs_exchrange_reserve_quota()
183 return xfs_trans_reserve_quota_nblks(tp, req->ip2, req->ip2_bcount, in xfs_exchrange_reserve_quota()
192 struct xfs_inode *ip2) in xfs_exchrange_mappings() argument
197 .ip2 = ip2, in xfs_exchrange_mappings()
207 trace_xfs_exchrange_mappings(fxr, ip1, ip2); in xfs_exchrange_mappings()
219 if (xfs_inode_has_bigrtalloc(ip2)) in xfs_exchrange_mappings()
233 xfs_exchrange_ilock(tp, ip1, ip2); in xfs_exchrange_mappings()
235 trace_xfs_exchrange_before(ip2, 2); in xfs_exchrange_mappings()
250 xfs_exchrange_iunlock(ip1, ip2); in xfs_exchrange_mappings()
254 xfs_blockgc_free_quota(ip2, 0); in xfs_exchrange_mappings()
269 xfs_trans_ichgtime(tp, ip2, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); in xfs_exchrange_mappings()
283 trace_xfs_exchrange_after(ip2, 2); in xfs_exchrange_mappings()
298 temp = i_size_read(VFS_I(ip2)); in xfs_exchrange_mappings()
299 i_size_write(VFS_I(ip2), i_size_read(VFS_I(ip1))); in xfs_exchrange_mappings()
304 xfs_exchrange_iunlock(ip1, ip2); in xfs_exchrange_mappings()
544 struct xfs_inode *ip2, in xfs_exchrange_check_rtalign() argument
552 size2 = i_size_read(VFS_I(ip2)); in xfs_exchrange_check_rtalign()
582 if (ip1 == ip2 && in xfs_exchrange_check_rtalign()
609 struct xfs_inode *ip2) in xfs_exchrange_prep() argument
611 struct xfs_mount *mp = ip2->i_mount; in xfs_exchrange_prep()
612 unsigned int alloc_unit = xfs_inode_alloc_unitsize(ip2); in xfs_exchrange_prep()
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()
639 error = xfs_exchrange_check_freshness(fxr, ip2); in xfs_exchrange_prep()
645 error = xfs_qm_dqattach(ip2); in xfs_exchrange_prep()
652 trace_xfs_exchrange_flush(fxr, ip1, ip2); in xfs_exchrange_prep()
655 error = xfs_flush_unmap_range(ip2, fxr->file2_offset, fxr->length); in xfs_exchrange_prep()
674 if (xfs_inode_has_cow_data(ip2)) { in xfs_exchrange_prep()
675 error = xfs_reflink_cancel_cow_range(ip2, fxr->file2_offset, in xfs_exchrange_prep()
695 struct xfs_inode *ip2 = XFS_I(inode2); in xfs_exchrange_contents() local
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()
736 trace_xfs_exchrange_error(ip2, error, _RET_IP_); in xfs_exchrange_contents()
865 struct xfs_inode *ip2 = XFS_I(inode2); in xfs_ioc_start_commit() local
875 memcpy(&kern_f->fsid, ip2->i_mount->m_fixedfsid, sizeof(xfs_fsid_t)); in xfs_ioc_start_commit()
877 xfs_ilock(ip2, lockflags); in xfs_ioc_start_commit()
884 kern_f->file2_ino = ip2->i_ino; in xfs_ioc_start_commit()
887 xfs_iunlock(ip2, lockflags); in xfs_ioc_start_commit()
910 struct xfs_inode *ip2 = XFS_I(file_inode(file)); in xfs_ioc_commit_range() local
911 struct xfs_mount *mp = ip2->i_mount; in xfs_ioc_commit_range()