diff options
Diffstat (limited to 'fs/xfs/quota/xfs_dquot.h')
-rw-r--r-- | fs/xfs/quota/xfs_dquot.h | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/fs/xfs/quota/xfs_dquot.h b/fs/xfs/quota/xfs_dquot.h index 0c3fe3175baa..39175103c8e0 100644 --- a/fs/xfs/quota/xfs_dquot.h +++ b/fs/xfs/quota/xfs_dquot.h | |||
@@ -114,25 +114,18 @@ typedef struct xfs_dquot { | |||
114 | #define XFS_DQHOLD(dqp) ((dqp)->q_nrefs++) | 114 | #define XFS_DQHOLD(dqp) ((dqp)->q_nrefs++) |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * Quota Accounting flags | 117 | * Quota Accounting/Enforcement flags |
118 | */ | 118 | */ |
119 | #define XFS_ALL_QUOTA_ACCT (XFS_UQUOTA_ACCT | XFS_GQUOTA_ACCT) | 119 | #define XFS_ALL_QUOTA_ACCT \ |
120 | #define XFS_ALL_QUOTA_ENFD (XFS_UQUOTA_ENFD | XFS_GQUOTA_ENFD) | 120 | (XFS_UQUOTA_ACCT | XFS_GQUOTA_ACCT | XFS_PQUOTA_ACCT) |
121 | #define XFS_ALL_QUOTA_CHKD (XFS_UQUOTA_CHKD | XFS_GQUOTA_CHKD) | 121 | #define XFS_ALL_QUOTA_ENFD (XFS_UQUOTA_ENFD | XFS_OQUOTA_ENFD) |
122 | #define XFS_ALL_QUOTA_ACTV (XFS_UQUOTA_ACTIVE | XFS_GQUOTA_ACTIVE) | 122 | #define XFS_ALL_QUOTA_CHKD (XFS_UQUOTA_CHKD | XFS_OQUOTA_CHKD) |
123 | #define XFS_ALL_QUOTA_ACCT_ENFD (XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|\ | ||
124 | XFS_GQUOTA_ACCT|XFS_GQUOTA_ENFD) | ||
125 | 123 | ||
126 | #define XFS_IS_QUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_ALL_QUOTA_ACCT) | 124 | #define XFS_IS_QUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_ALL_QUOTA_ACCT) |
127 | #define XFS_IS_UQUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_UQUOTA_ACCT) | ||
128 | #define XFS_IS_GQUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_GQUOTA_ACCT) | ||
129 | |||
130 | /* | ||
131 | * Quota Limit Enforcement flags | ||
132 | */ | ||
133 | #define XFS_IS_QUOTA_ENFORCED(mp) ((mp)->m_qflags & XFS_ALL_QUOTA_ENFD) | 125 | #define XFS_IS_QUOTA_ENFORCED(mp) ((mp)->m_qflags & XFS_ALL_QUOTA_ENFD) |
134 | #define XFS_IS_UQUOTA_ENFORCED(mp) ((mp)->m_qflags & XFS_UQUOTA_ENFD) | 126 | #define XFS_IS_UQUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_UQUOTA_ACCT) |
135 | #define XFS_IS_GQUOTA_ENFORCED(mp) ((mp)->m_qflags & XFS_GQUOTA_ENFD) | 127 | #define XFS_IS_PQUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_PQUOTA_ACCT) |
128 | #define XFS_IS_GQUOTA_RUNNING(mp) ((mp)->m_qflags & XFS_GQUOTA_ACCT) | ||
136 | 129 | ||
137 | #ifdef DEBUG | 130 | #ifdef DEBUG |
138 | static inline int | 131 | static inline int |
@@ -167,6 +160,8 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp) | |||
167 | #define XFS_DQ_IS_ON_FREELIST(dqp) ((dqp)->dq_flnext != (dqp)) | 160 | #define XFS_DQ_IS_ON_FREELIST(dqp) ((dqp)->dq_flnext != (dqp)) |
168 | #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->dq_flags & XFS_DQ_DIRTY) | 161 | #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->dq_flags & XFS_DQ_DIRTY) |
169 | #define XFS_QM_ISUDQ(dqp) ((dqp)->dq_flags & XFS_DQ_USER) | 162 | #define XFS_QM_ISUDQ(dqp) ((dqp)->dq_flags & XFS_DQ_USER) |
163 | #define XFS_QM_ISPDQ(dqp) ((dqp)->dq_flags & XFS_DQ_PROJ) | ||
164 | #define XFS_QM_ISGDQ(dqp) ((dqp)->dq_flags & XFS_DQ_GROUP) | ||
170 | #define XFS_DQ_TO_QINF(dqp) ((dqp)->q_mount->m_quotainfo) | 165 | #define XFS_DQ_TO_QINF(dqp) ((dqp)->q_mount->m_quotainfo) |
171 | #define XFS_DQ_TO_QIP(dqp) (XFS_QM_ISUDQ(dqp) ? \ | 166 | #define XFS_DQ_TO_QIP(dqp) (XFS_QM_ISUDQ(dqp) ? \ |
172 | XFS_DQ_TO_QINF(dqp)->qi_uquotaip : \ | 167 | XFS_DQ_TO_QINF(dqp)->qi_uquotaip : \ |
@@ -174,7 +169,7 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp) | |||
174 | 169 | ||
175 | #define XFS_IS_THIS_QUOTA_OFF(d) (! (XFS_QM_ISUDQ(d) ? \ | 170 | #define XFS_IS_THIS_QUOTA_OFF(d) (! (XFS_QM_ISUDQ(d) ? \ |
176 | (XFS_IS_UQUOTA_ON((d)->q_mount)) : \ | 171 | (XFS_IS_UQUOTA_ON((d)->q_mount)) : \ |
177 | (XFS_IS_GQUOTA_ON((d)->q_mount)))) | 172 | (XFS_IS_OQUOTA_ON((d)->q_mount)))) |
178 | 173 | ||
179 | #ifdef XFS_DQUOT_TRACE | 174 | #ifdef XFS_DQUOT_TRACE |
180 | /* | 175 | /* |
@@ -211,7 +206,6 @@ extern void xfs_qm_adjust_dqtimers(xfs_mount_t *, | |||
211 | xfs_disk_dquot_t *); | 206 | xfs_disk_dquot_t *); |
212 | extern void xfs_qm_adjust_dqlimits(xfs_mount_t *, | 207 | extern void xfs_qm_adjust_dqlimits(xfs_mount_t *, |
213 | xfs_disk_dquot_t *); | 208 | xfs_disk_dquot_t *); |
214 | extern int xfs_qm_dqwarn(xfs_disk_dquot_t *, uint); | ||
215 | extern int xfs_qm_dqget(xfs_mount_t *, xfs_inode_t *, | 209 | extern int xfs_qm_dqget(xfs_mount_t *, xfs_inode_t *, |
216 | xfs_dqid_t, uint, uint, xfs_dquot_t **); | 210 | xfs_dqid_t, uint, uint, xfs_dquot_t **); |
217 | extern void xfs_qm_dqput(xfs_dquot_t *); | 211 | extern void xfs_qm_dqput(xfs_dquot_t *); |