提交 4177af3a 编写于 作者: C Chandra Seetharaman 提交者: Ben Myers

Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage

Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage
of quota macros.
Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NBen Myers <bpm@sgi.com>
上级 6bd92a23
...@@ -1499,7 +1499,7 @@ xfs_qm_quotacheck( ...@@ -1499,7 +1499,7 @@ xfs_qm_quotacheck(
* quotachecked status, since we won't be doing accounting for * quotachecked status, since we won't be doing accounting for
* that type anymore. * that type anymore.
*/ */
mp->m_qflags &= ~(XFS_OQUOTA_CHKD | XFS_UQUOTA_CHKD); mp->m_qflags &= ~XFS_ALL_QUOTA_CHKD;
mp->m_qflags |= flags; mp->m_qflags |= flags;
error_return: error_return:
......
...@@ -174,6 +174,8 @@ typedef struct xfs_qoff_logformat { ...@@ -174,6 +174,8 @@ typedef struct xfs_qoff_logformat {
#define XFS_UQUOTA_ACTIVE 0x0100 /* uquotas are being turned off */ #define XFS_UQUOTA_ACTIVE 0x0100 /* uquotas are being turned off */
#define XFS_PQUOTA_ACTIVE 0x0200 /* pquotas are being turned off */ #define XFS_PQUOTA_ACTIVE 0x0200 /* pquotas are being turned off */
#define XFS_GQUOTA_ACTIVE 0x0400 /* gquotas are being turned off */ #define XFS_GQUOTA_ACTIVE 0x0400 /* gquotas are being turned off */
#define XFS_ALL_QUOTA_ACTIVE \
(XFS_UQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE | XFS_GQUOTA_ACTIVE)
/* /*
* Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees * Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees
......
...@@ -324,10 +324,9 @@ xfs_parseargs( ...@@ -324,10 +324,9 @@ xfs_parseargs(
} else if (!strcmp(this_char, MNTOPT_FILESTREAM)) { } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) {
mp->m_flags |= XFS_MOUNT_FILESTREAMS; mp->m_flags |= XFS_MOUNT_FILESTREAMS;
} else if (!strcmp(this_char, MNTOPT_NOQUOTA)) { } else if (!strcmp(this_char, MNTOPT_NOQUOTA)) {
mp->m_qflags &= ~(XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE | mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE | mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE | mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
XFS_UQUOTA_ENFD | XFS_OQUOTA_ENFD);
} else if (!strcmp(this_char, MNTOPT_QUOTA) || } else if (!strcmp(this_char, MNTOPT_QUOTA) ||
!strcmp(this_char, MNTOPT_UQUOTA) || !strcmp(this_char, MNTOPT_UQUOTA) ||
!strcmp(this_char, MNTOPT_USRQUOTA)) { !strcmp(this_char, MNTOPT_USRQUOTA)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册