diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:30:50 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:30:50 -0800 |
commit | 3c79e6a87221e063064e3680946a8b4bcd9fe78d (patch) | |
tree | 43b624cdc2a022d751c1d3648591cf18ec488651 /fs | |
parent | d9c0775897147bab54410611ac2659a7477c770c (diff) | |
download | linux-stable-3c79e6a87221e063064e3680946a8b4bcd9fe78d.tar.gz linux-stable-3c79e6a87221e063064e3680946a8b4bcd9fe78d.tar.bz2 linux-stable-3c79e6a87221e063064e3680946a8b4bcd9fe78d.zip |
xfs: create a macro for decoding ftypes in tracepoints
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/libxfs/xfs_da_format.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h index 24f9d1461f9a..060e5c96b70f 100644 --- a/fs/xfs/libxfs/xfs_da_format.h +++ b/fs/xfs/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. */ |