Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/uring_cmd: explicitly disallow cancelations for IOPOLL

This currently isn't supported, and due to a recent commit, it also
cannot easily be supported by io_uring due to hash_node and IOPOLL
completion data overlapping.

This can be revisited if we ever do support cancelations of requests
that have gone to the block stack.

Suggested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

+9
+9
io_uring/uring_cmd.c
··· 104 104 struct io_kiocb *req = cmd_to_io_kiocb(cmd); 105 105 struct io_ring_ctx *ctx = req->ctx; 106 106 107 + /* 108 + * Doing cancelations on IOPOLL requests are not supported. Both 109 + * because they can't get canceled in the block stack, but also 110 + * because iopoll completion data overlaps with the hash_node used 111 + * for tracking. 112 + */ 113 + if (ctx->flags & IORING_SETUP_IOPOLL) 114 + return; 115 + 107 116 if (!(cmd->flags & IORING_URING_CMD_CANCELABLE)) { 108 117 cmd->flags |= IORING_URING_CMD_CANCELABLE; 109 118 io_ring_submit_lock(ctx, issue_flags);