[1/3] xfs: make iomap type tracing work
diff mbox series

Message ID 20181121225958.30947-2-david@fromorbit.com
State New
Headers show
Series
  • xfs: enums don't work with __print_symbolic
Related show

Commit Message

Dave Chinner Nov. 21, 2018, 10:59 p.m. UTC
From: Dave Chinner <dchinner@redhat.com>

__print_symbolic does crazy things and stringifies the tables
that are used to map values to strings. Hence if we use enums
for the values, it just doesn't work because XFS_IO_COW != 3,
it's a string.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 fs/xfs/xfs_aops.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Patch
diff mbox series

diff --git a/fs/xfs/xfs_aops.h b/fs/xfs/xfs_aops.h
index 494b4338446e..810ad0362431 100644
--- a/fs/xfs/xfs_aops.h
+++ b/fs/xfs/xfs_aops.h
@@ -11,13 +11,11 @@  extern struct bio_set xfs_ioend_bioset;
 /*
  * Types of I/O for bmap clustering and I/O completion tracking.
  */
-enum {
-	XFS_IO_HOLE,		/* covers region without any block allocation */
-	XFS_IO_DELALLOC,	/* covers delalloc region */
-	XFS_IO_UNWRITTEN,	/* covers allocated but uninitialized data */
-	XFS_IO_OVERWRITE,	/* covers already allocated extent */
-	XFS_IO_COW,		/* covers copy-on-write extent */
-};
+#define XFS_IO_HOLE		0 /* covers region with no block allocation */
+#define XFS_IO_DELALLOC		1 /* covers delalloc region */
+#define XFS_IO_UNWRITTEN	2 /* covers allocated but uninitialized data */
+#define XFS_IO_OVERWRITE	3 /* covers already allocated extent */
+#define XFS_IO_COW		4 /* covers copy-on-write extent */
 
 #define XFS_IO_TYPES \
 	{ XFS_IO_HOLE,			"hole" },	\