uint8_t i_forkoff; /* attr fork offset >> 3 */
uint16_t i_diflags; /* XFS_DIFLAG_... */
uint64_t i_diflags2; /* XFS_DIFLAG2_... */
- struct xfs_icdinode i_d; /* most of ondisk inode */
+ struct timespec64 i_crtime; /* time created */
xfs_extnum_t i_cnextents; /* # of extents in cow fork */
unsigned int i_cformat; /* format of cow fork */
ip->i_diflags = pip ? 0 : xfs_flags2diflags(ip, fsx->fsx_xflags);
if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb)) {
- ASSERT(ip->i_d.di_ino == ino);
- ASSERT(uuid_equal(&ip->i_d.di_uuid, &mp->m_sb.sb_meta_uuid));
VFS_I(ip)->i_version = 1;
ip->i_diflags2 = pip ? ip->i_mount->m_ino_geo.new_diflags2 :
xfs_flags2diflags2(ip, fsx->fsx_xflags);
- ip->i_d.di_crtime = VFS_I(ip)->i_mtime; /* struct copy */
+ ip->i_crtime = VFS_I(ip)->i_mtime; /* struct copy */
ip->i_cowextsize = pip ? 0 : fsx->fsx_cowextsize;
}
/* set *dip = inode's place in the buffer */
dip = xfs_buf_offset(bp, ip->i_imap.im_boffset);
- ASSERT(ip->i_d.di_magic == XFS_DINODE_MAGIC);
if (XFS_ISREG(ip)) {
ASSERT( (ip->i_df.if_format == XFS_DINODE_FMT_EXTENTS) ||
(ip->i_df.if_format == XFS_DINODE_FMT_BTREE) );
* attribute use the XFS_DFORK_DPTR, XFS_DFORK_APTR, and XFS_DFORK_PTR macros
* below.
*
- * There is a very similar struct icdinode in xfs_inode which matches the
- * layout of the first 96 bytes of this structure, but is kept in native
- * format instead of big endian.
+ * There is a very similar struct xfs_log_dinode which matches the layout of
+ * this structure, but is kept in native format instead of big endian.
*
* Note: di_flushiter is only used by v1/2 inodes - it's effectively a zeroed
* padding field for v3 inodes.
struct xfs_inode *ip,
struct xfs_dinode *from)
{
- struct xfs_icdinode *to = &ip->i_d;
struct inode *inode = VFS_I(ip);
int error;
xfs_failaddr_t fa;
if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb)) {
inode_set_iversion_queried(inode,
be64_to_cpu(from->di_changecount));
- to->di_crtime = xfs_inode_from_disk_ts(from, from->di_crtime);
+ ip->i_crtime = xfs_inode_from_disk_ts(from, from->di_crtime);
ip->i_diflags2 = be64_to_cpu(from->di_flags2);
ip->i_cowextsize = be32_to_cpu(from->di_cowextsize);
}
struct xfs_dinode *to,
xfs_lsn_t lsn)
{
- struct xfs_icdinode *from = &ip->i_d;
struct inode *inode = VFS_I(ip);
to->di_magic = cpu_to_be16(XFS_DINODE_MAGIC);
if (xfs_sb_version_has_v3inode(&ip->i_mount->m_sb)) {
to->di_version = 3;
to->di_changecount = cpu_to_be64(inode_peek_iversion(inode));
- to->di_crtime = xfs_inode_to_disk_ts(ip, from->di_crtime);
+ to->di_crtime = xfs_inode_to_disk_ts(ip, ip->i_crtime);
to->di_flags2 = cpu_to_be64(ip->i_diflags2);
to->di_cowextsize = cpu_to_be32(ip->i_cowextsize);
to->di_ino = cpu_to_be64(ip->i_ino);
struct xfs_inode;
struct xfs_dinode;
-/*
- * In memory representation of the XFS inode. This is held in the in-core struct
- * xfs_inode and represents the current on disk values but the structure is not
- * in on-disk format. That is, this structure is always translated to on-disk
- * format specific structures at the appropriate time.
- */
-struct xfs_icdinode {
- struct timespec64 di_crtime; /* time created */
-};
-
/*
* Inode location information. Stored in the inode and passed to
* xfs_imap_to_bp() to get a buffer and dinode for a given inode.
if (flags & XFS_ICHGTIME_CHG)
inode->i_ctime = tv;
if (flags & XFS_ICHGTIME_CREATE)
- ip->i_d.di_crtime = tv;
+ ip->i_crtime = tv;
}
/*
static inline void
reset_inode_fields(struct xfs_inode *ip)
{
- memset(&ip->i_d, 0, sizeof(ip->i_d));
ip->i_projid = 0;
ip->i_disk_size = 0;
ip->i_nblocks = 0;
ip->i_forkoff = 0;
ip->i_diflags = 0;
ip->i_diflags2 = 0;
+ ip->i_crtime.tv_sec = 0;
+ ip->i_crtime.tv_nsec = 0;
}
static void