From: Chandra Seetharaman <sekharan@us.ibm.com>
To: xfs@oss.sgi.com
Cc: Chandra Seetharaman <sekharan@us.ibm.com>
Subject: [RFC PATCH 4/4] Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage
Date: Thu, 27 Oct 2011 17:05:50 -0500 [thread overview]
Message-ID: <20111027220550.2638.115.sendpatchset@chandra-lucid.austin.ibm.com> (raw)
In-Reply-To: <20111027220523.2638.12351.sendpatchset@chandra-lucid.austin.ibm.com>
Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage
of quota macros.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
fs/xfs/xfs_qm.c | 2 +-
fs/xfs/xfs_quota.h | 2 ++
fs/xfs/xfs_super.c | 7 +++----
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 5cff443..508cee7 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1688,7 +1688,7 @@ xfs_qm_quotacheck(
* quotachecked status, since we won't be doing accounting for
* that type anymore.
*/
- mp->m_qflags &= ~(XFS_OQUOTA_CHKD | XFS_UQUOTA_CHKD);
+ mp->m_qflags &= ~XFS_ALL_QUOTA_CHKD;
mp->m_qflags |= flags;
error_return:
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index a595f29..1e52504 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -176,6 +176,8 @@ typedef struct xfs_qoff_logformat {
#define XFS_UQUOTA_ACTIVE 0x0100 /* uquotas 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_ALL_QUOTA_ACTIVE \
+ (XFS_UQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE | XFS_GQUOTA_ACTIVE)
/*
* Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 3eca58f..5e4364a 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -325,10 +325,9 @@ xfs_parseargs(
} else if (!strcmp(this_char, MNTOPT_FILESTREAM)) {
mp->m_flags |= XFS_MOUNT_FILESTREAMS;
} else if (!strcmp(this_char, MNTOPT_NOQUOTA)) {
- mp->m_qflags &= ~(XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
- XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
- XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
- XFS_UQUOTA_ENFD | XFS_OQUOTA_ENFD);
+ mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
+ mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
+ mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
} else if (!strcmp(this_char, MNTOPT_QUOTA) ||
!strcmp(this_char, MNTOPT_UQUOTA) ||
!strcmp(this_char, MNTOPT_USRQUOTA)) {
--
1.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-10-27 22:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-27 22:05 [RFC PATCH 0/4] Rearrange code to make the code more readable Chandra Seetharaman
2011-10-27 22:05 ` [RFC PATCH 1/4] Define a new function xfs_this_quota_on() Chandra Seetharaman
2011-10-27 22:24 ` Christoph Hellwig
2011-11-11 20:29 ` Alex Elder
2011-10-27 22:05 ` [RFC PATCH 2/4] Define a new function xfs_inode_dquot() Chandra Seetharaman
2011-11-11 20:29 ` Alex Elder
2011-10-27 22:05 ` [RFC PATCH 3/4] Change xfs_sb_from_disk() interface to take a mount pointer Chandra Seetharaman
2011-11-11 20:29 ` Alex Elder
2011-10-27 22:05 ` Chandra Seetharaman [this message]
2011-11-07 20:05 ` [RFC PATCH 0/4] Rearrange code to make the code more readable Ben Myers
-- strict thread matches above, loose matches on Subject: below --
2012-01-23 17:31 Chandra Seetharaman
2012-01-23 17:31 ` [RFC PATCH 4/4] Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage Chandra Seetharaman
2012-01-24 17:53 ` Christoph Hellwig
2012-02-03 17:16 ` Ben Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111027220550.2638.115.sendpatchset@chandra-lucid.austin.ibm.com \
--to=sekharan@us.ibm.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox