summaryrefslogtreecommitdiff
path: root/include/linux/io_uring.h
diff options
context:
space:
mode:
authorDylan Yudaken <dylany@fb.com>2022-04-26 11:29:05 +0300
committerJens Axboe <axboe@kernel.dk>2022-04-26 15:50:42 +0300
commit33337d03f04f9ea3a50ac2d3490a5d7a3ba9be82 (patch)
treee1cac17dba676d80ee7b837f11ceb81f571be261 /include/linux/io_uring.h
parentcc51eaa8b530bf070e76847a717adcbf603469b7 (diff)
downloadlinux-33337d03f04f9ea3a50ac2d3490a5d7a3ba9be82.tar.xz
io_uring: add io_uring_get_opcode
In some debug scenarios it is useful to have the text representation of the opcode. Add this function in preparation. Signed-off-by: Dylan Yudaken <dylany@fb.com> Link: https://lore.kernel.org/r/20220426082907.3600028-3-dylany@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring.h')
-rw-r--r--include/linux/io_uring.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h
index 1814e698d861..24651c229ed2 100644
--- a/include/linux/io_uring.h
+++ b/include/linux/io_uring.h
@@ -10,6 +10,7 @@ struct sock *io_uring_get_socket(struct file *file);
void __io_uring_cancel(bool cancel_all);
void __io_uring_free(struct task_struct *tsk);
void io_uring_unreg_ringfd(void);
+const char *io_uring_get_opcode(u8 opcode);
static inline void io_uring_files_cancel(void)
{
@@ -42,6 +43,10 @@ static inline void io_uring_files_cancel(void)
static inline void io_uring_free(struct task_struct *tsk)
{
}
+static inline const char *io_uring_get_opcode(u8 opcode)
+{
+ return "";
+}
#endif
#endif