From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 15/17] xfs: convert quota options flags to unsigned.
Date: Mon, 11 Apr 2022 10:31:45 +1000 [thread overview]
Message-ID: <20220411003147.2104423-16-david@fromorbit.com> (raw)
In-Reply-To: <20220411003147.2104423-1-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
5.18 w/ std=gnu11 compiled with gcc-5 wants flags stored in unsigned
fields to be unsigned.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/libxfs/xfs_quota_defs.h | 45 +++++++++++++++++++++++-----------
fs/xfs/xfs_trace.h | 16 ------------
2 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_quota_defs.h b/fs/xfs/libxfs/xfs_quota_defs.h
index fdfe3cc6f15c..3076cd74fcaa 100644
--- a/fs/xfs/libxfs/xfs_quota_defs.h
+++ b/fs/xfs/libxfs/xfs_quota_defs.h
@@ -73,29 +73,45 @@ typedef uint8_t xfs_dqtype_t;
* to a single function. None of these XFS_QMOPT_* flags are meant to have
* persistent values (ie. their values can and will change between versions)
*/
-#define XFS_QMOPT_UQUOTA 0x0000004 /* user dquot requested */
-#define XFS_QMOPT_PQUOTA 0x0000008 /* project dquot requested */
-#define XFS_QMOPT_FORCE_RES 0x0000010 /* ignore quota limits */
-#define XFS_QMOPT_SBVERSION 0x0000040 /* change superblock version num */
-#define XFS_QMOPT_GQUOTA 0x0002000 /* group dquot requested */
+#define XFS_QMOPT_UQUOTA (1u << 0) /* user dquot requested */
+#define XFS_QMOPT_GQUOTA (1u << 1) /* group dquot requested */
+#define XFS_QMOPT_PQUOTA (1u << 2) /* project dquot requested */
+#define XFS_QMOPT_FORCE_RES (1u << 3) /* ignore quota limits */
+#define XFS_QMOPT_SBVERSION (1u << 4) /* change superblock version num */
/*
* flags to xfs_trans_mod_dquot to indicate which field needs to be
* modified.
*/
-#define XFS_QMOPT_RES_REGBLKS 0x0010000
-#define XFS_QMOPT_RES_RTBLKS 0x0020000
-#define XFS_QMOPT_BCOUNT 0x0040000
-#define XFS_QMOPT_ICOUNT 0x0080000
-#define XFS_QMOPT_RTBCOUNT 0x0100000
-#define XFS_QMOPT_DELBCOUNT 0x0200000
-#define XFS_QMOPT_DELRTBCOUNT 0x0400000
-#define XFS_QMOPT_RES_INOS 0x0800000
+#define XFS_QMOPT_RES_REGBLKS (1u << 7)
+#define XFS_QMOPT_RES_RTBLKS (1u << 8)
+#define XFS_QMOPT_BCOUNT (1u << 9)
+#define XFS_QMOPT_ICOUNT (1u << 10)
+#define XFS_QMOPT_RTBCOUNT (1u << 11)
+#define XFS_QMOPT_DELBCOUNT (1u << 12)
+#define XFS_QMOPT_DELRTBCOUNT (1u << 13)
+#define XFS_QMOPT_RES_INOS (1u << 14)
/*
* flags for dqalloc.
*/
-#define XFS_QMOPT_INHERIT 0x1000000
+#define XFS_QMOPT_INHERIT (1u << 31)
+
+#define XFS_QMOPT_FLAGS \
+ { XFS_QMOPT_UQUOTA, "UQUOTA" }, \
+ { XFS_QMOPT_PQUOTA, "PQUOTA" }, \
+ { XFS_QMOPT_FORCE_RES, "FORCE_RES" }, \
+ { XFS_QMOPT_SBVERSION, "SBVERSION" }, \
+ { XFS_QMOPT_GQUOTA, "GQUOTA" }, \
+ { XFS_QMOPT_INHERIT, "INHERIT" }, \
+ { XFS_QMOPT_RES_REGBLKS, "RES_REGBLKS" }, \
+ { XFS_QMOPT_RES_RTBLKS, "RES_RTBLKS" }, \
+ { XFS_QMOPT_BCOUNT, "BCOUNT" }, \
+ { XFS_QMOPT_ICOUNT, "ICOUNT" }, \
+ { XFS_QMOPT_RTBCOUNT, "RTBCOUNT" }, \
+ { XFS_QMOPT_DELBCOUNT, "DELBCOUNT" }, \
+ { XFS_QMOPT_DELRTBCOUNT, "DELRTBCOUNT" }, \
+ { XFS_QMOPT_RES_INOS, "RES_INOS" }
/*
* flags to xfs_trans_mod_dquot.
@@ -114,6 +130,7 @@ typedef uint8_t xfs_dqtype_t;
(XFS_QMOPT_UQUOTA | XFS_QMOPT_PQUOTA | XFS_QMOPT_GQUOTA)
#define XFS_QMOPT_RESBLK_MASK (XFS_QMOPT_RES_REGBLKS | XFS_QMOPT_RES_RTBLKS)
+
extern xfs_failaddr_t xfs_dquot_verify(struct xfs_mount *mp,
struct xfs_disk_dquot *ddq, xfs_dqid_t id);
extern xfs_failaddr_t xfs_dqblk_verify(struct xfs_mount *mp,
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 989ecda904db..b88bd45da27a 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -1096,22 +1096,6 @@ DEFINE_DQUOT_EVENT(xfs_dqflush_done);
DEFINE_DQUOT_EVENT(xfs_trans_apply_dquot_deltas_before);
DEFINE_DQUOT_EVENT(xfs_trans_apply_dquot_deltas_after);
-#define XFS_QMOPT_FLAGS \
- { XFS_QMOPT_UQUOTA, "UQUOTA" }, \
- { XFS_QMOPT_PQUOTA, "PQUOTA" }, \
- { XFS_QMOPT_FORCE_RES, "FORCE_RES" }, \
- { XFS_QMOPT_SBVERSION, "SBVERSION" }, \
- { XFS_QMOPT_GQUOTA, "GQUOTA" }, \
- { XFS_QMOPT_INHERIT, "INHERIT" }, \
- { XFS_QMOPT_RES_REGBLKS, "RES_REGBLKS" }, \
- { XFS_QMOPT_RES_RTBLKS, "RES_RTBLKS" }, \
- { XFS_QMOPT_BCOUNT, "BCOUNT" }, \
- { XFS_QMOPT_ICOUNT, "ICOUNT" }, \
- { XFS_QMOPT_RTBCOUNT, "RTBCOUNT" }, \
- { XFS_QMOPT_DELBCOUNT, "DELBCOUNT" }, \
- { XFS_QMOPT_DELRTBCOUNT, "DELRTBCOUNT" }, \
- { XFS_QMOPT_RES_INOS, "RES_INOS" }
-
TRACE_EVENT(xfs_trans_mod_dquot,
TP_PROTO(struct xfs_trans *tp, struct xfs_dquot *dqp,
unsigned int field, int64_t delta),
--
2.35.1
next prev parent reply other threads:[~2022-04-11 0:32 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 0:31 [PATCH 00/17] xfs: unsigned flags conversion for c11 Dave Chinner
2022-04-11 0:31 ` [PATCH 01/17] xfs: convert buffer flags to unsigned Dave Chinner
2022-04-11 10:05 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 02/17] xfs: convert attr type " Dave Chinner
2022-04-11 10:23 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 03/17] xfs: convert scrub " Dave Chinner
2022-04-11 10:33 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 04/17] xfs: convert bmap extent " Dave Chinner
2022-04-11 10:42 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 05/17] xfs: convert bmapi " Dave Chinner
2022-04-11 12:53 ` Chandan Babu R
2022-04-11 13:44 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 06/17] xfs: convert AGF log " Dave Chinner
2022-04-11 13:27 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 07/17] xfs: convert AGI " Dave Chinner
2022-04-11 13:49 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 08/17] xfs: convert btree buffer " Dave Chinner
2022-04-11 14:03 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 09/17] xfs: convert buffer log item " Dave Chinner
2022-04-12 7:25 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 10/17] xfs: convert da btree operations " Dave Chinner
2022-04-12 7:25 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 11/17] xfs: convert dquot " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 12/17] xfs: convert log item tracepoint " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 13/17] xfs: convert inode lock " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-12 8:43 ` Dave Chinner
2022-04-21 0:44 ` [PATCH 13/17 v2] " Dave Chinner
2022-04-21 3:07 ` Alli
2022-04-21 9:15 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 14/17] xfs: convert ptag " Dave Chinner
2022-04-12 7:26 ` Chandan Babu R
2022-04-11 0:31 ` Dave Chinner [this message]
2022-04-12 7:26 ` [PATCH 15/17] xfs: convert quota options " Chandan Babu R
2022-04-11 0:31 ` [PATCH 16/17] xfs: convert shutdown reasons " Dave Chinner
2022-04-12 7:27 ` Chandan Babu R
2022-04-11 0:31 ` [PATCH 17/17] xfs: convert log ticket and iclog flags " Dave Chinner
2022-04-12 7:27 ` Chandan Babu R
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=20220411003147.2104423-16-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/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