Lines Matching refs:ip

71 	xfs_inode_t     *ip=NULL, *tip=NULL, *ips[2];  in xfs_swapext()  local
104 ip = XFS_BHVTOI(bdp); in xfs_swapext()
122 if (ip->i_mount != tip->i_mount) { in xfs_swapext()
127 if (ip->i_ino == tip->i_ino) { in xfs_swapext()
132 mp = ip->i_mount; in xfs_swapext()
144 if (ip->i_ino < tip->i_ino) { in xfs_swapext()
145 ips[0] = ip; in xfs_swapext()
149 ips[1] = ip; in xfs_swapext()
155 error = xfs_iaccess(ip, S_IWUSR, NULL); in xfs_swapext()
164 if ((ip->i_d.di_mode & S_IFMT) != (tip->i_d.di_mode & S_IFMT)) { in xfs_swapext()
170 if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != in xfs_swapext()
177 if (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL || in xfs_swapext()
195 sx.sx_length != ip->i_d.di_size || in xfs_swapext()
206 if ( XFS_IFORK_Q(ip) != XFS_IFORK_Q(tip) ) { in xfs_swapext()
218 if ((sbp->bs_ctime.tv_sec != ip->i_d.di_ctime.t_sec) || in xfs_swapext()
219 (sbp->bs_ctime.tv_nsec != ip->i_d.di_ctime.t_nsec) || in xfs_swapext()
220 (sbp->bs_mtime.tv_sec != ip->i_d.di_mtime.t_sec) || in xfs_swapext()
221 (sbp->bs_mtime.tv_nsec != ip->i_d.di_mtime.t_nsec)) { in xfs_swapext()
237 xfs_iunlock(ip, XFS_ILOCK_EXCL); in xfs_swapext()
254 xfs_iunlock(ip, XFS_IOLOCK_EXCL); in xfs_swapext()
264 if ( ((XFS_IFORK_Q(ip) != 0) && (ip->i_d.di_anextents > 0)) && in xfs_swapext()
265 (ip->i_d.di_aformat != XFS_DINODE_FMT_LOCAL)) { in xfs_swapext()
266 error = xfs_bmap_count_blocks(tp, ip, XFS_ATTR_FORK, &aforkblks); in xfs_swapext()
268 xfs_iunlock(ip, lock_flags); in xfs_swapext()
279 xfs_iunlock(ip, lock_flags); in xfs_swapext()
289 ifp = &ip->i_df; in xfs_swapext()
298 tmp = (__uint64_t)ip->i_d.di_nblocks; in xfs_swapext()
299 ip->i_d.di_nblocks = tip->i_d.di_nblocks - taforkblks + aforkblks; in xfs_swapext()
302 tmp = (__uint64_t) ip->i_d.di_nextents; in xfs_swapext()
303 ip->i_d.di_nextents = tip->i_d.di_nextents; in xfs_swapext()
306 tmp = (__uint64_t) ip->i_d.di_format; in xfs_swapext()
307 ip->i_d.di_format = tip->i_d.di_format; in xfs_swapext()
312 switch(ip->i_d.di_format) { in xfs_swapext()
318 if (ip->i_d.di_nextents <= XFS_INLINE_EXTS) { in xfs_swapext()
356 xfs_trans_ijoin(tp, ip, lock_flags); in xfs_swapext()
359 xfs_trans_log_inode(tp, ip, ilf_fields); in xfs_swapext()
379 xfs_iunlock(ip, lock_flags); in xfs_swapext()