From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 10/17] xfs: convert da btree operations flags to unsigned.
Date: Mon, 11 Apr 2022 10:31:40 +1000 [thread overview]
Message-ID: <20220411003147.2104423-11-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_da_btree.h | 16 ++++++++--------
fs/xfs/xfs_trace.h | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h
index 0faf7d9ac241..7b0f986e5cb5 100644
--- a/fs/xfs/libxfs/xfs_da_btree.h
+++ b/fs/xfs/libxfs/xfs_da_btree.h
@@ -76,19 +76,19 @@ typedef struct xfs_da_args {
xfs_dablk_t rmtblkno2; /* remote attr value starting blkno */
int rmtblkcnt2; /* remote attr value block count */
int rmtvaluelen2; /* remote attr value length in bytes */
- int op_flags; /* operation flags */
+ uint32_t op_flags; /* operation flags */
enum xfs_dacmp cmpresult; /* name compare result for lookups */
} xfs_da_args_t;
/*
* Operation flags:
*/
-#define XFS_DA_OP_JUSTCHECK 0x0001 /* check for ok with no space */
-#define XFS_DA_OP_RENAME 0x0002 /* this is an atomic rename op */
-#define XFS_DA_OP_ADDNAME 0x0004 /* this is an add operation */
-#define XFS_DA_OP_OKNOENT 0x0008 /* lookup/add op, ENOENT ok, else die */
-#define XFS_DA_OP_CILOOKUP 0x0010 /* lookup to return CI name if found */
-#define XFS_DA_OP_NOTIME 0x0020 /* don't update inode timestamps */
+#define XFS_DA_OP_JUSTCHECK (1u << 0) /* check for ok with no space */
+#define XFS_DA_OP_RENAME (1u << 1) /* this is an atomic rename op */
+#define XFS_DA_OP_ADDNAME (1u << 2) /* this is an add operation */
+#define XFS_DA_OP_OKNOENT (1u << 3) /* lookup op, ENOENT ok, else die */
+#define XFS_DA_OP_CILOOKUP (1u << 4) /* lookup returns CI name if found */
+#define XFS_DA_OP_NOTIME (1u << 5) /* don't update inode timestamps */
#define XFS_DA_OP_FLAGS \
{ XFS_DA_OP_JUSTCHECK, "JUSTCHECK" }, \
@@ -197,7 +197,7 @@ int xfs_da3_node_read_mapped(struct xfs_trans *tp, struct xfs_inode *dp,
* Utility routines.
*/
-#define XFS_DABUF_MAP_HOLE_OK (1 << 0)
+#define XFS_DABUF_MAP_HOLE_OK (1u << 0)
int xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno);
int xfs_da_grow_inode_int(struct xfs_da_args *args, xfs_fileoff_t *bno,
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index b141ef78c755..989ecda904db 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -1924,7 +1924,7 @@ DECLARE_EVENT_CLASS(xfs_da_class,
__field(int, namelen)
__field(xfs_dahash_t, hashval)
__field(xfs_ino_t, inumber)
- __field(int, op_flags)
+ __field(uint32_t, op_flags)
),
TP_fast_assign(
__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
@@ -1990,7 +1990,7 @@ DECLARE_EVENT_CLASS(xfs_attr_class,
__field(xfs_dahash_t, hashval)
__field(unsigned int, attr_filter)
__field(unsigned int, attr_flags)
- __field(int, op_flags)
+ __field(uint32_t, op_flags)
),
TP_fast_assign(
__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
@@ -2097,7 +2097,7 @@ DECLARE_EVENT_CLASS(xfs_dir2_space_class,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(xfs_ino_t, ino)
- __field(int, op_flags)
+ __field(uint32_t, op_flags)
__field(int, idx)
),
TP_fast_assign(
@@ -2128,7 +2128,7 @@ TRACE_EVENT(xfs_dir2_leafn_moveents,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(xfs_ino_t, ino)
- __field(int, op_flags)
+ __field(uint32_t, op_flags)
__field(int, src_idx)
__field(int, dst_idx)
__field(int, count)
--
2.35.1
next prev parent reply other threads:[~2022-04-11 0:31 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 ` Dave Chinner [this message]
2022-04-12 7:25 ` [PATCH 10/17] xfs: convert da btree operations " 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 ` [PATCH 15/17] xfs: convert quota options " Dave Chinner
2022-04-12 7:26 ` 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-11-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