};
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 */
xfs_extnum_t i_cnextents; /* # of extents in cow fork */
static inline bool xfs_is_reflink_inode(struct xfs_inode *ip)
{
- return ip->i_d.di_flags2 & XFS_DIFLAG2_REFLINK;
+ return ip->i_diflags2 & XFS_DIFLAG2_REFLINK;
}
static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
{
- return ip->i_d.di_flags2 & XFS_DIFLAG2_BIGTIME;
+ return ip->i_diflags2 & XFS_DIFLAG2_BIGTIME;
}
typedef struct cred {
unsigned int xflags)
{
uint64_t di_flags2 =
- (ip->i_d.di_flags2 & (XFS_DIFLAG2_REFLINK |
- XFS_DIFLAG2_BIGTIME));
+ (ip->i_diflags2 & (XFS_DIFLAG2_REFLINK |
+ XFS_DIFLAG2_BIGTIME));
if (xflags & FS_XFLAG_DAX)
di_flags2 |= XFS_DIFLAG2_DAX;
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_d.di_flags2 = pip ? ip->i_mount->m_ino_geo.new_diflags2 :
+ 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_cowextsize = pip ? 0 : fsx->fsx_cowextsize;
inode_set_iversion_queried(inode,
be64_to_cpu(from->di_changecount));
to->di_crtime = xfs_inode_from_disk_ts(from, from->di_crtime);
- to->di_flags2 = be64_to_cpu(from->di_flags2);
+ ip->i_diflags2 = be64_to_cpu(from->di_flags2);
ip->i_cowextsize = be32_to_cpu(from->di_cowextsize);
}
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_flags2 = cpu_to_be64(from->di_flags2);
+ 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);
to->di_lsn = cpu_to_be64(lsn);
* format specific structures at the appropriate time.
*/
struct xfs_icdinode {
- uint64_t di_flags2; /* more random flags */
-
struct timespec64 di_crtime; /* time created */
};
if ((flags & (XFS_ILOG_CORE | XFS_ILOG_TIMESTAMP)) &&
xfs_sb_version_hasbigtime(&ip->i_mount->m_sb) &&
!xfs_inode_has_bigtime(ip)) {
- ip->i_d.di_flags2 |= XFS_DIFLAG2_BIGTIME;
+ ip->i_diflags2 |= XFS_DIFLAG2_BIGTIME;
flags |= XFS_ILOG_CORE;
}
ip->i_flushiter = 0;
ip->i_forkoff = 0;
ip->i_diflags = 0;
+ ip->i_diflags2 = 0;
}
static void
times = XFS_ICHGTIME_CHG | XFS_ICHGTIME_MOD;
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
VFS_I(ip)->i_version = 1;
- ip->i_d.di_flags2 = 0;
+ ip->i_diflags2 = 0;
times |= XFS_ICHGTIME_CREATE;
}
libxfs_trans_ichgtime(tp, ip, times);
times = XFS_ICHGTIME_CHG | XFS_ICHGTIME_MOD;
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
VFS_I(ip)->i_version = 1;
- ip->i_d.di_flags2 = 0;
+ ip->i_diflags2 = 0;
times |= XFS_ICHGTIME_CREATE;
}
libxfs_trans_ichgtime(tp, ip, times);
times = XFS_ICHGTIME_CHG | XFS_ICHGTIME_MOD;
if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
VFS_I(ip)->i_version = 1;
- ip->i_d.di_flags2 = 0;
+ ip->i_diflags2 = 0;
times |= XFS_ICHGTIME_CREATE;
}
libxfs_trans_ichgtime(tp, ip, times);