summaryrefslogtreecommitdiff
path: root/include/linux/io_uring.h
diff options
context:
space:
mode:
authorKanchan Joshi <joshi.k@samsung.com>2022-08-23 21:44:41 +0530
committerJens Axboe <axboe@kernel.dk>2022-09-21 10:30:42 -0600
commit5756a3a7e713bcab705a5f0c810a2b1f7f4ecfaa (patch)
tree1052175b9867cc3e94bb2ad5bfdee560dcc0ba72 /include/linux/io_uring.h
parentde27e18e86173b704beaa19f0ee376f3305c4794 (diff)
io_uring: add iopoll infrastructure for io_uring_cmd
Put this up in the same way as iopoll is done for regular read/write IO. Make place for storing a cookie into struct io_uring_cmd on submission. Perform the completion using the ->uring_cmd_iopoll handler. Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Link: https://lore.kernel.org/r/20220823161443.49436-3-joshi.k@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/io_uring.h')
-rw-r--r--include/linux/io_uring.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h
index 4a2f6cc5a492..58676c0a398f 100644
--- a/include/linux/io_uring.h
+++ b/include/linux/io_uring.h
@@ -20,8 +20,12 @@ enum io_uring_cmd_flags {
struct io_uring_cmd {
struct file *file;
const void *cmd;
- /* callback to defer completions to task context */
- void (*task_work_cb)(struct io_uring_cmd *cmd);
+ union {
+ /* callback to defer completions to task context */
+ void (*task_work_cb)(struct io_uring_cmd *cmd);
+ /* used for polled completion */
+ void *cookie;
+ };
u32 cmd_op;
u32 pad;
u8 pdu[32]; /* available inline for free use */