Lines Matching refs:ip
172 struct xfs_inode *ip, in xfs_inode_from_disk() argument
175 struct inode *inode = VFS_I(ip); in xfs_inode_from_disk()
179 ASSERT(ip->i_cowfp == NULL); in xfs_inode_from_disk()
181 fa = xfs_dinode_verify(ip->i_mount, ip->i_ino, from); in xfs_inode_from_disk()
183 xfs_inode_verifier_error(ip, -EFSCORRUPTED, "dinode", from, in xfs_inode_from_disk()
193 if (!xfs_has_v3inodes(ip->i_mount)) in xfs_inode_from_disk()
194 ip->i_flushiter = be16_to_cpu(from->di_flushiter); in xfs_inode_from_disk()
207 ip->i_projid = 0; in xfs_inode_from_disk()
210 ip->i_projid = (prid_t)be16_to_cpu(from->di_projid_hi) << 16 | in xfs_inode_from_disk()
228 ip->i_disk_size = be64_to_cpu(from->di_size); in xfs_inode_from_disk()
229 ip->i_nblocks = be64_to_cpu(from->di_nblocks); in xfs_inode_from_disk()
230 ip->i_extsize = be32_to_cpu(from->di_extsize); in xfs_inode_from_disk()
231 ip->i_forkoff = from->di_forkoff; in xfs_inode_from_disk()
232 ip->i_diflags = be16_to_cpu(from->di_flags); in xfs_inode_from_disk()
233 ip->i_next_unlinked = be32_to_cpu(from->di_next_unlinked); in xfs_inode_from_disk()
236 xfs_iflags_set(ip, XFS_IPRESERVE_DM_FIELDS); in xfs_inode_from_disk()
238 if (xfs_has_v3inodes(ip->i_mount)) { in xfs_inode_from_disk()
241 ip->i_crtime = xfs_inode_from_disk_ts(from, from->di_crtime); in xfs_inode_from_disk()
242 ip->i_diflags2 = be64_to_cpu(from->di_flags2); in xfs_inode_from_disk()
243 ip->i_cowextsize = be32_to_cpu(from->di_cowextsize); in xfs_inode_from_disk()
246 error = xfs_iformat_data_fork(ip, from); in xfs_inode_from_disk()
250 error = xfs_iformat_attr_fork(ip, from); in xfs_inode_from_disk()
254 if (xfs_is_reflink_inode(ip)) in xfs_inode_from_disk()
255 xfs_ifork_init_cow(ip); in xfs_inode_from_disk()
259 xfs_idestroy_fork(&ip->i_df); in xfs_inode_from_disk()
266 struct xfs_inode *ip, in xfs_inode_to_disk_ts() argument
272 if (xfs_inode_has_bigtime(ip)) in xfs_inode_to_disk_ts()
284 struct xfs_inode *ip, in xfs_inode_to_disk_iext_counters() argument
287 if (xfs_inode_has_large_extent_counts(ip)) { in xfs_inode_to_disk_iext_counters()
288 to->di_big_nextents = cpu_to_be64(xfs_ifork_nextents(&ip->i_df)); in xfs_inode_to_disk_iext_counters()
289 to->di_big_anextents = cpu_to_be32(xfs_ifork_nextents(&ip->i_af)); in xfs_inode_to_disk_iext_counters()
296 to->di_nextents = cpu_to_be32(xfs_ifork_nextents(&ip->i_df)); in xfs_inode_to_disk_iext_counters()
297 to->di_anextents = cpu_to_be16(xfs_ifork_nextents(&ip->i_af)); in xfs_inode_to_disk_iext_counters()
303 struct xfs_inode *ip, in xfs_inode_to_disk() argument
307 struct inode *inode = VFS_I(ip); in xfs_inode_to_disk()
312 to->di_format = xfs_ifork_format(&ip->i_df); in xfs_inode_to_disk()
315 to->di_projid_lo = cpu_to_be16(ip->i_projid & 0xffff); in xfs_inode_to_disk()
316 to->di_projid_hi = cpu_to_be16(ip->i_projid >> 16); in xfs_inode_to_disk()
318 to->di_atime = xfs_inode_to_disk_ts(ip, inode->i_atime); in xfs_inode_to_disk()
319 to->di_mtime = xfs_inode_to_disk_ts(ip, inode->i_mtime); in xfs_inode_to_disk()
320 to->di_ctime = xfs_inode_to_disk_ts(ip, inode_get_ctime(inode)); in xfs_inode_to_disk()
325 to->di_size = cpu_to_be64(ip->i_disk_size); in xfs_inode_to_disk()
326 to->di_nblocks = cpu_to_be64(ip->i_nblocks); in xfs_inode_to_disk()
327 to->di_extsize = cpu_to_be32(ip->i_extsize); in xfs_inode_to_disk()
328 to->di_forkoff = ip->i_forkoff; in xfs_inode_to_disk()
329 to->di_aformat = xfs_ifork_format(&ip->i_af); in xfs_inode_to_disk()
330 to->di_flags = cpu_to_be16(ip->i_diflags); in xfs_inode_to_disk()
332 if (xfs_has_v3inodes(ip->i_mount)) { in xfs_inode_to_disk()
335 to->di_crtime = xfs_inode_to_disk_ts(ip, ip->i_crtime); in xfs_inode_to_disk()
336 to->di_flags2 = cpu_to_be64(ip->i_diflags2); in xfs_inode_to_disk()
337 to->di_cowextsize = cpu_to_be32(ip->i_cowextsize); in xfs_inode_to_disk()
338 to->di_ino = cpu_to_be64(ip->i_ino); in xfs_inode_to_disk()
341 uuid_copy(&to->di_uuid, &ip->i_mount->m_sb.sb_meta_uuid); in xfs_inode_to_disk()
345 to->di_flushiter = cpu_to_be16(ip->i_flushiter); in xfs_inode_to_disk()
349 xfs_inode_to_disk_iext_counters(ip, to); in xfs_inode_to_disk()