From 6823e536c80fc3f4cfd64fa1dd1360770ffd241f Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 27 Feb 2019 17:13:45 -0600 Subject: [PATCH] xfs: stringify btree cursor types in ftrace output Source kernel commit: c494213f30080423b70b24b6af7f6da554d9390f Use __print_symbolic to print the btree type in ftrace output. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- libxfs/xfs_types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libxfs/xfs_types.h b/libxfs/xfs_types.h index 6da6ce7ab..75dfa9741 100644 --- a/libxfs/xfs_types.h +++ b/libxfs/xfs_types.h @@ -113,11 +113,24 @@ typedef enum { { XFS_LOOKUP_LEi, "le" }, \ { XFS_LOOKUP_GEi, "ge" } +/* + * This enum is used in string mapping in xfs_trace.h; please keep the + * TRACE_DEFINE_ENUMs for it up to date. + */ typedef enum { XFS_BTNUM_BNOi, XFS_BTNUM_CNTi, XFS_BTNUM_RMAPi, XFS_BTNUM_BMAPi, XFS_BTNUM_INOi, XFS_BTNUM_FINOi, XFS_BTNUM_REFCi, XFS_BTNUM_MAX } xfs_btnum_t; +#define XFS_BTNUM_STRINGS \ + { XFS_BTNUM_BNOi, "bnobt" }, \ + { XFS_BTNUM_CNTi, "cntbt" }, \ + { XFS_BTNUM_RMAPi, "rmapbt" }, \ + { XFS_BTNUM_BMAPi, "bmbt" }, \ + { XFS_BTNUM_INOi, "inobt" }, \ + { XFS_BTNUM_FINOi, "finobt" }, \ + { XFS_BTNUM_REFCi, "refcbt" } + struct xfs_name { const unsigned char *name; int len; -- 2.39.2