~ubuntu-branches/ubuntu/utopic/xfsprogs/utopic-proposed

« back to all changes in this revision

Viewing changes to include/xfs_quota.h

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Scott
  • Date: 2009-05-06 11:29:18 UTC
  • mfrom: (8.1.1 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090506112918-uzoyzcp90rtr8td7
Tags: 3.0.2
New bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
typedef __uint32_t      xfs_dqid_t;
32
32
 
33
33
/*
34
 
 * Eventhough users may not have quota limits occupying all 64-bits,
 
34
 * Even though users may not have quota limits occupying all 64-bits,
35
35
 * they may need 64-bit accounting. Hence, 64-bit quota-counters,
36
36
 * and quota-limits. This is a waste in the common case, but hey ...
37
37
 */
154
154
#define XFS_ALL_QUOTA_CHKD      (XFS_UQUOTA_CHKD | XFS_OQUOTA_CHKD)
155
155
 
156
156
#define XFS_IS_QUOTA_RUNNING(mp)        ((mp)->m_qflags & XFS_ALL_QUOTA_ACCT)
157
 
#define XFS_IS_QUOTA_ENFORCED(mp)       ((mp)->m_qflags & XFS_ALL_QUOTA_ENFD)
158
157
#define XFS_IS_UQUOTA_RUNNING(mp)       ((mp)->m_qflags & XFS_UQUOTA_ACCT)
159
158
#define XFS_IS_PQUOTA_RUNNING(mp)       ((mp)->m_qflags & XFS_PQUOTA_ACCT)
160
159
#define XFS_IS_GQUOTA_RUNNING(mp)       ((mp)->m_qflags & XFS_GQUOTA_ACCT)
 
160
#define XFS_IS_UQUOTA_ENFORCED(mp)      ((mp)->m_qflags & XFS_UQUOTA_ENFD)
 
161
#define XFS_IS_OQUOTA_ENFORCED(mp)      ((mp)->m_qflags & XFS_OQUOTA_ENFD)
161
162
 
162
163
/*
163
164
 * Incore only flags for quotaoff - these bits get cleared when quota(s)
196
197
#define XFS_QMOPT_QUOTAOFF      0x0000080 /* quotas are being turned off */
197
198
#define XFS_QMOPT_UMOUNTING     0x0000100 /* filesys is being unmounted */
198
199
#define XFS_QMOPT_DOLOG         0x0000200 /* log buf changes (in quotacheck) */
199
 
#define XFS_QMOPT_DOWARN        0x0000400 /* increase warning cnt if necessary */
 
200
#define XFS_QMOPT_DOWARN        0x0000400 /* increase warning cnt if needed */
200
201
#define XFS_QMOPT_ILOCKED       0x0000800 /* inode is already locked (excl) */
201
 
#define XFS_QMOPT_DQREPAIR      0x0001000 /* repair dquot, if damaged. */
 
202
#define XFS_QMOPT_DQREPAIR      0x0001000 /* repair dquot if damaged */
202
203
#define XFS_QMOPT_GQUOTA        0x0002000 /* group dquot requested */
 
204
#define XFS_QMOPT_ENOSPC        0x0004000 /* enospc instead of edquot (prj) */
203
205
 
204
206
/*
205
207
 * flags to xfs_trans_mod_dquot to indicate which field needs to be
246
248
#ifdef __KERNEL__
247
249
/*
248
250
 * This check is done typically without holding the inode lock;
249
 
 * that may seem racey, but it is harmless in the context that it is used.
 
251
 * that may seem racy, but it is harmless in the context that it is used.
250
252
 * The inode cannot go inactive as long a reference is kept, and
251
253
 * therefore if dquot(s) were attached, they'll stay consistent.
252
254
 * If, for example, the ownership of the inode changes while
280
282
                                 XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|\
281
283
                                 XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|\
282
284
                                 XFS_GQUOTA_ACCT)
283
 
#define XFS_MOUNT_QUOTA_MASK    (XFS_MOUNT_QUOTA_ALL | XFS_UQUOTA_ACTIVE | \
284
 
                                 XFS_GQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE)
285
285
 
286
286
 
287
287
/*
330
330
} xfs_dqtrxops_t;
331
331
 
332
332
#define XFS_DQTRXOP(mp, tp, op, args...) \
333
 
                ((mp)->m_qm_ops.xfs_dqtrxops ? \
334
 
                ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : 0)
 
333
                ((mp)->m_qm_ops->xfs_dqtrxops ? \
 
334
                ((mp)->m_qm_ops->xfs_dqtrxops->op)(tp, ## args) : 0)
335
335
 
336
336
#define XFS_DQTRXOP_VOID(mp, tp, op, args...) \
337
 
                ((mp)->m_qm_ops.xfs_dqtrxops ? \
338
 
                ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : (void)0)
 
337
                ((mp)->m_qm_ops->xfs_dqtrxops ? \
 
338
                ((mp)->m_qm_ops->xfs_dqtrxops->op)(tp, ## args) : (void)0)
339
339
 
340
340
#define XFS_TRANS_DUP_DQINFO(mp, otp, ntp) \
341
341
        XFS_DQTRXOP_VOID(mp, otp, qo_dup_dqinfo, ntp)
364
364
extern int xfs_qm_dqcheck(xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *);
365
365
extern int xfs_mount_reset_sbqflags(struct xfs_mount *);
366
366
 
367
 
extern struct bhv_vfsops xfs_qmops;
 
367
extern struct xfs_qmops xfs_qmcore_xfs;
368
368
 
369
369
#endif  /* __KERNEL__ */
370
370