struct xfs_ifork i_df; /* data fork */
struct xfs_inode_log_item *i_itemp; /* logging information */
unsigned int i_delayed_blks; /* count of delay alloc blks */
+ prid_t i_projid; /* owner's project id */
struct xfs_icdinode i_d; /* most of ondisk inode */
xfs_extnum_t i_cnextents; /* # of extents in cow fork */
set_nlink(VFS_I(ip), nlink);
i_uid_write(VFS_I(ip), cr->cr_uid);
i_gid_write(VFS_I(ip), cr->cr_gid);
- ip->i_d.di_projid = pip ? 0 : fsx->fsx_projid;
+ ip->i_projid = pip ? 0 : fsx->fsx_projid;
xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG | XFS_ICHGTIME_MOD);
if (pip && (VFS_I(pip)->i_mode & S_ISGID)) {
*/
if (unlikely(from->di_version == 1)) {
set_nlink(inode, be16_to_cpu(from->di_onlink));
- to->di_projid = 0;
+ ip->i_projid = 0;
} else {
set_nlink(inode, be32_to_cpu(from->di_nlink));
- to->di_projid = (prid_t)be16_to_cpu(from->di_projid_hi) << 16 |
+ ip->i_projid = (prid_t)be16_to_cpu(from->di_projid_hi) << 16 |
be16_to_cpu(from->di_projid_lo);
}
to->di_format = xfs_ifork_format(&ip->i_df);
to->di_uid = cpu_to_be32(i_uid_read(inode));
to->di_gid = cpu_to_be32(i_gid_read(inode));
- to->di_projid_lo = cpu_to_be16(from->di_projid & 0xffff);
- to->di_projid_hi = cpu_to_be16(from->di_projid >> 16);
+ to->di_projid_lo = cpu_to_be16(ip->i_projid & 0xffff);
+ to->di_projid_hi = cpu_to_be16(ip->i_projid >> 16);
memset(to->di_pad, 0, sizeof(to->di_pad));
to->di_atime = xfs_inode_to_disk_ts(ip, inode->i_atime);
*/
struct xfs_icdinode {
uint16_t di_flushiter; /* incremented on flush */
- prid_t di_projid; /* owner's project id */
xfs_fsize_t di_size; /* number of bytes in file */
xfs_rfsblock_t di_nblocks; /* # of direct & btree blocks used */
xfs_extlen_t di_extsize; /* basic/minimum extent size for file */
reset_inode_fields(struct xfs_inode *ip)
{
memset(&ip->i_d, 0, sizeof(ip->i_d));
+ ip->i_projid = 0;
}
static void
if (group_dquots)
qc_adjust(group_dquots, i_gid_read(VFS_I(ip)), blocks, rtblks);
if (proj_dquots)
- qc_adjust(proj_dquots, ip->i_d.di_projid, blocks, rtblks);
+ qc_adjust(proj_dquots, ip->i_projid, blocks, rtblks);
libxfs_irele(ip);
}