From: Darrick J. Wong Date: Mon, 22 Apr 2024 17:00:52 +0000 (-0700) Subject: xfs: create a macro for decoding ftypes in tracepoints X-Git-Tag: v6.9.0~18^2~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=453f3d4a3199abe5c7658c6bae6e475e214310ba;p=thirdparty%2Fxfsprogs-dev.git xfs: create a macro for decoding ftypes in tracepoints Source kernel commit: 3c79e6a87221e063064e3680946a8b4bcd9fe78d Create the XFS_DIR3_FTYPE_STR macro so that we can report ftype as strings instead of numbers in tracepoints. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Carlos Maiolino --- diff --git a/libxfs/xfs_da_format.h b/libxfs/xfs_da_format.h index 24f9d146..060e5c96 100644 --- a/libxfs/xfs_da_format.h +++ b/libxfs/xfs_da_format.h @@ -159,6 +159,17 @@ struct xfs_da3_intnode { #define XFS_DIR3_FT_MAX 9 +#define XFS_DIR3_FTYPE_STR \ + { XFS_DIR3_FT_UNKNOWN, "unknown" }, \ + { XFS_DIR3_FT_REG_FILE, "file" }, \ + { XFS_DIR3_FT_DIR, "directory" }, \ + { XFS_DIR3_FT_CHRDEV, "char" }, \ + { XFS_DIR3_FT_BLKDEV, "block" }, \ + { XFS_DIR3_FT_FIFO, "fifo" }, \ + { XFS_DIR3_FT_SOCK, "sock" }, \ + { XFS_DIR3_FT_SYMLINK, "symlink" }, \ + { XFS_DIR3_FT_WHT, "whiteout" } + /* * Byte offset in data block and shortform entry. */