diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-14 10:37:31 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-28 20:24:14 -0700 |
commit | d3537cf93e5e2f8b4e95cfe8bc8fa03b58c88e32 (patch) | |
tree | 7ebefdb074fdedba11c4c2ccc47a2b71ab7e860a /fs/xfs/xfs_dquot.h | |
parent | 784e80f5640db9a925af1143a25e9bb98624350d (diff) |
xfs: stop using q_core limits in the quota code
Add limits fields in the incore dquot, and use that instead of the ones
in qcore. This eliminates a bunch of endian conversions and will
eventually allow us to remove qcore entirely.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_dquot.h')
-rw-r--r-- | fs/xfs/xfs_dquot.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h index c2f841ed2661..59790140fcb6 100644 --- a/fs/xfs/xfs_dquot.h +++ b/fs/xfs/xfs_dquot.h @@ -30,6 +30,10 @@ enum { struct xfs_dquot_res { /* Total resources allocated and reserved. */ xfs_qcnt_t reserved; + + /* Absolute and preferred limits. */ + xfs_qcnt_t hardlimit; + xfs_qcnt_t softlimit; }; /* @@ -143,7 +147,7 @@ static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp) { int64_t freesp; - freesp = be64_to_cpu(dqp->q_core.d_blk_hardlimit) - dqp->q_blk.reserved; + freesp = dqp->q_blk.hardlimit - dqp->q_blk.reserved; if (freesp < dqp->q_low_space[XFS_QLOWSP_1_PCNT]) return true; |