Commit ceaf603c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong
Browse files

xfs: move the di_projid field to struct xfs_inode



In preparation of removing the historic icinode struct, move the projid
field into the containing xfs_inode structure.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 7e2a8af5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -206,10 +206,10 @@ xfs_inode_from_disk(
	 */
	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);
	}

@@ -294,8 +294,8 @@ xfs_inode_to_disk(
	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);
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ struct xfs_dinode;
 */
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 */
+1 −1
Original line number Diff line number Diff line
@@ -1208,7 +1208,7 @@ xfs_swap_extents_check_format(
	if (XFS_IS_QUOTA_ON(ip->i_mount) &&
	    (!uid_eq(VFS_I(ip)->i_uid, VFS_I(tip)->i_uid) ||
	     !gid_eq(VFS_I(ip)->i_gid, VFS_I(tip)->i_gid) ||
	     ip->i_d.di_projid != tip->i_d.di_projid))
	     ip->i_projid != tip->i_projid))
		return -EINVAL;

	/* Should never get a local format */
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ xfs_qm_id_for_quotatype(
	case XFS_DQTYPE_GROUP:
		return i_gid_read(VFS_I(ip));
	case XFS_DQTYPE_PROJ:
		return ip->i_d.di_projid;
		return ip->i_projid;
	}
	ASSERT(0);
	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -1204,7 +1204,7 @@ xfs_inode_match_id(
		return false;

	if ((eofb->eof_flags & XFS_EOF_FLAGS_PRID) &&
	    ip->i_d.di_projid != eofb->eof_prid)
	    ip->i_projid != eofb->eof_prid)
		return false;

	return true;
@@ -1228,7 +1228,7 @@ xfs_inode_match_id_union(
		return true;

	if ((eofb->eof_flags & XFS_EOF_FLAGS_PRID) &&
	    ip->i_d.di_projid == eofb->eof_prid)
	    ip->i_projid == eofb->eof_prid)
		return true;

	return false;
Loading