]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: stringify btree cursor types in ftrace output
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 27 Feb 2019 23:13:45 +0000 (17:13 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 27 Feb 2019 23:13:45 +0000 (17:13 -0600)
Source kernel commit: c494213f30080423b70b24b6af7f6da554d9390f

Use __print_symbolic to print the btree type in ftrace output.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_types.h

index 6da6ce7ab5d282a8557144b23585284966ba42a8..75dfa974172b7d4ffe8fd52f057a71dcb1a21dea 100644 (file)
@@ -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;