Skip to content

Commit f53dde1

Browse files
dgchinnerdchinner
authored andcommitted
xfs: convert AGF log flags to unsigned.
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> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
1 parent e7d410a commit f53dde1

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2777,7 +2777,7 @@ xfs_alloc_get_freelist(
27772777
xfs_agblock_t bno;
27782778
__be32 *agfl_bno;
27792779
int error;
2780-
int logflags;
2780+
uint32_t logflags;
27812781
struct xfs_mount *mp = tp->t_mountp;
27822782
struct xfs_perag *pag;
27832783

@@ -2830,9 +2830,9 @@ xfs_alloc_get_freelist(
28302830
*/
28312831
void
28322832
xfs_alloc_log_agf(
2833-
xfs_trans_t *tp, /* transaction pointer */
2834-
struct xfs_buf *bp, /* buffer for a.g. freelist header */
2835-
int fields) /* mask of fields to be logged (XFS_AGF_...) */
2833+
struct xfs_trans *tp,
2834+
struct xfs_buf *bp,
2835+
uint32_t fields)
28362836
{
28372837
int first; /* first byte offset */
28382838
int last; /* last byte offset */
@@ -2902,7 +2902,7 @@ xfs_alloc_put_freelist(
29022902
struct xfs_perag *pag;
29032903
__be32 *blockp;
29042904
int error;
2905-
int logflags;
2905+
uint32_t logflags;
29062906
__be32 *agfl_bno;
29072907
int startoff;
29082908

fs/xfs/libxfs/xfs_alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void
121121
xfs_alloc_log_agf(
122122
struct xfs_trans *tp, /* transaction pointer */
123123
struct xfs_buf *bp, /* buffer for a.g. freelist header */
124-
int fields);/* mask of fields to be logged (XFS_AGF_...) */
124+
uint32_t fields);/* mask of fields to be logged (XFS_AGF_...) */
125125

126126
/*
127127
* Interface for inode allocation to force the pag data to be initialized.

fs/xfs/libxfs/xfs_format.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -525,26 +525,26 @@ typedef struct xfs_agf {
525525

526526
#define XFS_AGF_CRC_OFF offsetof(struct xfs_agf, agf_crc)
527527

528-
#define XFS_AGF_MAGICNUM 0x00000001
529-
#define XFS_AGF_VERSIONNUM 0x00000002
530-
#define XFS_AGF_SEQNO 0x00000004
531-
#define XFS_AGF_LENGTH 0x00000008
532-
#define XFS_AGF_ROOTS 0x00000010
533-
#define XFS_AGF_LEVELS 0x00000020
534-
#define XFS_AGF_FLFIRST 0x00000040
535-
#define XFS_AGF_FLLAST 0x00000080
536-
#define XFS_AGF_FLCOUNT 0x00000100
537-
#define XFS_AGF_FREEBLKS 0x00000200
538-
#define XFS_AGF_LONGEST 0x00000400
539-
#define XFS_AGF_BTREEBLKS 0x00000800
540-
#define XFS_AGF_UUID 0x00001000
541-
#define XFS_AGF_RMAP_BLOCKS 0x00002000
542-
#define XFS_AGF_REFCOUNT_BLOCKS 0x00004000
543-
#define XFS_AGF_REFCOUNT_ROOT 0x00008000
544-
#define XFS_AGF_REFCOUNT_LEVEL 0x00010000
545-
#define XFS_AGF_SPARE64 0x00020000
528+
#define XFS_AGF_MAGICNUM (1u << 0)
529+
#define XFS_AGF_VERSIONNUM (1u << 1)
530+
#define XFS_AGF_SEQNO (1u << 2)
531+
#define XFS_AGF_LENGTH (1u << 3)
532+
#define XFS_AGF_ROOTS (1u << 4)
533+
#define XFS_AGF_LEVELS (1u << 5)
534+
#define XFS_AGF_FLFIRST (1u << 6)
535+
#define XFS_AGF_FLLAST (1u << 7)
536+
#define XFS_AGF_FLCOUNT (1u << 8)
537+
#define XFS_AGF_FREEBLKS (1u << 9)
538+
#define XFS_AGF_LONGEST (1u << 10)
539+
#define XFS_AGF_BTREEBLKS (1u << 11)
540+
#define XFS_AGF_UUID (1u << 12)
541+
#define XFS_AGF_RMAP_BLOCKS (1u << 13)
542+
#define XFS_AGF_REFCOUNT_BLOCKS (1u << 14)
543+
#define XFS_AGF_REFCOUNT_ROOT (1u << 15)
544+
#define XFS_AGF_REFCOUNT_LEVEL (1u << 16)
545+
#define XFS_AGF_SPARE64 (1u << 17)
546546
#define XFS_AGF_NUM_BITS 18
547-
#define XFS_AGF_ALL_BITS ((1 << XFS_AGF_NUM_BITS) - 1)
547+
#define XFS_AGF_ALL_BITS ((1u << XFS_AGF_NUM_BITS) - 1)
548548

549549
#define XFS_AGF_FLAGS \
550550
{ XFS_AGF_MAGICNUM, "MAGICNUM" }, \

0 commit comments

Comments
 (0)