Skip to content

Commit f6c73a1

Browse files
riteshharjaniDarrick J. Wong
authored andcommitted
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>
1 parent 09a9639 commit f6c73a1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

include/linux/fs.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,20 @@ enum rw_hint {
340340
/* can use bio alloc cache */
341341
#define IOCB_ALLOC_CACHE (1 << 21)
342342

343+
/* for use in trace events */
344+
#define TRACE_IOCB_STRINGS \
345+
{ IOCB_HIPRI, "HIPRI" }, \
346+
{ IOCB_DSYNC, "DSYNC" }, \
347+
{ IOCB_SYNC, "SYNC" }, \
348+
{ IOCB_NOWAIT, "NOWAIT" }, \
349+
{ IOCB_APPEND, "APPEND" }, \
350+
{ IOCB_EVENTFD, "EVENTFD"}, \
351+
{ IOCB_DIRECT, "DIRECT" }, \
352+
{ IOCB_WRITE, "WRITE" }, \
353+
{ IOCB_WAITQ, "WAITQ" }, \
354+
{ IOCB_NOIO, "NOIO" }, \
355+
{ IOCB_ALLOC_CACHE, "ALLOC_CACHE" }
356+
343357
struct kiocb {
344358
struct file *ki_filp;
345359
loff_t ki_pos;

0 commit comments

Comments
 (0)