Skip to content

Commit 2eb7550

Browse files
Dave Chinnerdchinner
authored andcommitted
xfs: convert shutdown reasons 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 b9f3082 commit 2eb7550

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

fs/xfs/xfs_fsops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ xfs_fs_goingdown(
512512
void
513513
xfs_do_force_shutdown(
514514
struct xfs_mount *mp,
515-
int flags,
515+
uint32_t flags,
516516
char *fname,
517517
int lnnum)
518518
{

fs/xfs/xfs_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3829,7 +3829,7 @@ xlog_verify_iclog(
38293829
bool
38303830
xlog_force_shutdown(
38313831
struct xlog *log,
3832-
int shutdown_flags)
3832+
uint32_t shutdown_flags)
38333833
{
38343834
bool log_error = (shutdown_flags & SHUTDOWN_LOG_IO_ERROR);
38353835

fs/xfs/xfs_log.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void xfs_log_clean(struct xfs_mount *mp);
140140
bool xfs_log_check_lsn(struct xfs_mount *, xfs_lsn_t);
141141

142142
xfs_lsn_t xlog_grant_push_threshold(struct xlog *log, int need_bytes);
143-
bool xlog_force_shutdown(struct xlog *log, int shutdown_flags);
143+
bool xlog_force_shutdown(struct xlog *log, uint32_t shutdown_flags);
144144

145145
void xlog_use_incompat_feat(struct xlog *log);
146146
void xlog_drop_incompat_feat(struct xlog *log);

fs/xfs/xfs_mount.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,16 +425,15 @@ __XFS_IS_OPSTATE(blockgc_enabled, BLOCKGC_ENABLED)
425425
#define XFS_MAX_IO_LOG 30 /* 1G */
426426
#define XFS_MIN_IO_LOG PAGE_SHIFT
427427

428-
#define xfs_is_shutdown(mp) xfs_is_shutdown(mp)
429-
void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
428+
void xfs_do_force_shutdown(struct xfs_mount *mp, uint32_t flags, char *fname,
430429
int lnnum);
431430
#define xfs_force_shutdown(m,f) \
432431
xfs_do_force_shutdown(m, f, __FILE__, __LINE__)
433432

434-
#define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */
435-
#define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */
436-
#define SHUTDOWN_FORCE_UMOUNT 0x0004 /* shutdown from a forced unmount */
437-
#define SHUTDOWN_CORRUPT_INCORE 0x0008 /* corrupt in-memory data structures */
433+
#define SHUTDOWN_META_IO_ERROR (1u << 0) /* write attempt to metadata failed */
434+
#define SHUTDOWN_LOG_IO_ERROR (1u << 1) /* write attempt to the log failed */
435+
#define SHUTDOWN_FORCE_UMOUNT (1u << 2) /* shutdown from a forced unmount */
436+
#define SHUTDOWN_CORRUPT_INCORE (1u << 3) /* corrupt in-memory structures */
438437

439438
#define XFS_SHUTDOWN_STRINGS \
440439
{ SHUTDOWN_META_IO_ERROR, "metadata_io" }, \

0 commit comments

Comments
 (0)