xfs: create xfs_dqtype_t to represent quota types
Create a new type (xfs_dqtype_t) to represent the type of an incore dquot (user, group, project, or none). Rename the incore dquot's dq_flags field to q_type. This allows us to replace all the "uint type" arguments to the quota functions with "xfs_dqtype_t type", to make it obvious when we're passing a quota type argument into a function. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@ -1149,6 +1149,15 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev)
|
||||
#define XFS_DQUOT_MAGIC 0x4451 /* 'DQ' */
|
||||
#define XFS_DQUOT_VERSION (uint8_t)0x01 /* latest version number */
|
||||
|
||||
#define XFS_DQTYPE_USER 0x01 /* user dquot record */
|
||||
#define XFS_DQTYPE_PROJ 0x02 /* project dquot record */
|
||||
#define XFS_DQTYPE_GROUP 0x04 /* group dquot record */
|
||||
|
||||
/* bitmask to determine if this is a user/group/project dquot */
|
||||
#define XFS_DQTYPE_REC_MASK (XFS_DQTYPE_USER | \
|
||||
XFS_DQTYPE_PROJ | \
|
||||
XFS_DQTYPE_GROUP)
|
||||
|
||||
/*
|
||||
* This is the main portion of the on-disk representation of quota information
|
||||
* for a user. We pad this with some more expansion room to construct the on
|
||||
|
Reference in New Issue
Block a user