Commit f53dde11 authored by Dave Chinner's avatar Dave Chinner Committed by Dave Chinner
Browse files

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: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChandan Babu R <chandan.babu@oracle.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent e7d410ac
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2777,7 +2777,7 @@ xfs_alloc_get_freelist(
	xfs_agblock_t		bno;
	__be32			*agfl_bno;
	int			error;
	int			logflags;
	uint32_t		logflags;
	struct xfs_mount	*mp = tp->t_mountp;
	struct xfs_perag	*pag;

@@ -2830,9 +2830,9 @@ xfs_alloc_get_freelist(
 */
void
xfs_alloc_log_agf(
	xfs_trans_t	*tp,	/* transaction pointer */
	struct xfs_buf	*bp,	/* buffer for a.g. freelist header */
	int		fields)	/* mask of fields to be logged (XFS_AGF_...) */
	struct xfs_trans	*tp,
	struct xfs_buf		*bp,
	uint32_t		fields)
{
	int	first;		/* first byte offset */
	int	last;		/* last byte offset */
@@ -2902,7 +2902,7 @@ xfs_alloc_put_freelist(
	struct xfs_perag	*pag;
	__be32			*blockp;
	int			error;
	int			logflags;
	uint32_t		logflags;
	__be32			*agfl_bno;
	int			startoff;

+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ void
xfs_alloc_log_agf(
	struct xfs_trans *tp,	/* transaction pointer */
	struct xfs_buf	*bp,	/* buffer for a.g. freelist header */
	int		fields);/* mask of fields to be logged (XFS_AGF_...) */
	uint32_t	fields);/* mask of fields to be logged (XFS_AGF_...) */

/*
 * Interface for inode allocation to force the pag data to be initialized.
+19 −19
Original line number Diff line number Diff line
@@ -525,26 +525,26 @@ typedef struct xfs_agf {

#define XFS_AGF_CRC_OFF		offsetof(struct xfs_agf, agf_crc)

#define	XFS_AGF_MAGICNUM	0x00000001
#define	XFS_AGF_VERSIONNUM	0x00000002
#define	XFS_AGF_SEQNO		0x00000004
#define	XFS_AGF_LENGTH		0x00000008
#define	XFS_AGF_ROOTS		0x00000010
#define	XFS_AGF_LEVELS		0x00000020
#define	XFS_AGF_FLFIRST		0x00000040
#define	XFS_AGF_FLLAST		0x00000080
#define	XFS_AGF_FLCOUNT		0x00000100
#define	XFS_AGF_FREEBLKS	0x00000200
#define	XFS_AGF_LONGEST		0x00000400
#define	XFS_AGF_BTREEBLKS	0x00000800
#define	XFS_AGF_UUID		0x00001000
#define	XFS_AGF_RMAP_BLOCKS	0x00002000
#define	XFS_AGF_REFCOUNT_BLOCKS	0x00004000
#define	XFS_AGF_REFCOUNT_ROOT	0x00008000
#define	XFS_AGF_REFCOUNT_LEVEL	0x00010000
#define	XFS_AGF_SPARE64		0x00020000
#define	XFS_AGF_MAGICNUM	(1u << 0)
#define	XFS_AGF_VERSIONNUM	(1u << 1)
#define	XFS_AGF_SEQNO		(1u << 2)
#define	XFS_AGF_LENGTH		(1u << 3)
#define	XFS_AGF_ROOTS		(1u << 4)
#define	XFS_AGF_LEVELS		(1u << 5)
#define	XFS_AGF_FLFIRST		(1u << 6)
#define	XFS_AGF_FLLAST		(1u << 7)
#define	XFS_AGF_FLCOUNT		(1u << 8)
#define	XFS_AGF_FREEBLKS	(1u << 9)
#define	XFS_AGF_LONGEST		(1u << 10)
#define	XFS_AGF_BTREEBLKS	(1u << 11)
#define	XFS_AGF_UUID		(1u << 12)
#define	XFS_AGF_RMAP_BLOCKS	(1u << 13)
#define	XFS_AGF_REFCOUNT_BLOCKS	(1u << 14)
#define	XFS_AGF_REFCOUNT_ROOT	(1u << 15)
#define	XFS_AGF_REFCOUNT_LEVEL	(1u << 16)
#define	XFS_AGF_SPARE64		(1u << 17)
#define	XFS_AGF_NUM_BITS	18
#define	XFS_AGF_ALL_BITS	((1 << XFS_AGF_NUM_BITS) - 1)
#define	XFS_AGF_ALL_BITS	((1u << XFS_AGF_NUM_BITS) - 1)

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