diff options
author | Ritesh Harjani (IBM) <ritesh.list@gmail.com> | 2023-04-21 18:52:42 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-04-21 18:52:42 +0300 |
commit | f6c73a11133ef991284311387ca707b48bf53912 (patch) | |
tree | 8d982c98aef138ec6354019dc8d001429565e334 /include/linux/fs.h | |
parent | 09a9639e56c01c7a00d6c0ca63f4c7c41abe075d (diff) | |
download | linux-f6c73a11133ef991284311387ca707b48bf53912.tar.xz |
fs.h: Add TRACE_IOCB_STRINGS for use in trace points
Add TRACE_IOCB_STRINGS macro which can be used in the trace point patch to
print different flag values with meaningful string output.
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: line up strings all prettylike]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..75d24fa082e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -340,6 +340,20 @@ enum rw_hint { /* can use bio alloc cache */ #define IOCB_ALLOC_CACHE (1 << 21) +/* for use in trace events */ +#define TRACE_IOCB_STRINGS \ + { IOCB_HIPRI, "HIPRI" }, \ + { IOCB_DSYNC, "DSYNC" }, \ + { IOCB_SYNC, "SYNC" }, \ + { IOCB_NOWAIT, "NOWAIT" }, \ + { IOCB_APPEND, "APPEND" }, \ + { IOCB_EVENTFD, "EVENTFD"}, \ + { IOCB_DIRECT, "DIRECT" }, \ + { IOCB_WRITE, "WRITE" }, \ + { IOCB_WAITQ, "WAITQ" }, \ + { IOCB_NOIO, "NOIO" }, \ + { IOCB_ALLOC_CACHE, "ALLOC_CACHE" } + struct kiocb { struct file *ki_filp; loff_t ki_pos; |