From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring <io-uring@vger.kernel.org>
Subject: Re: [PATCH] io_uring/uring_cmd: explicitly disallow cancelations for IOPOLL
Date: Thu, 15 Jan 2026 09:44:33 +0800 [thread overview]
Message-ID: <aWhGgQ2XjTrZGjQi@fedora> (raw)
In-Reply-To: <636afbe3-d547-49da-aeaf-7da56e28608c@kernel.dk>
On Wed, Jan 14, 2026 at 08:52:31AM -0700, Jens Axboe wrote:
> 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>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> ---
>
> diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
> index 197474911f04..ee7b49f47cb5 100644
> --- a/io_uring/uring_cmd.c
> +++ b/io_uring/uring_cmd.c
> @@ -104,6 +104,15 @@ void io_uring_cmd_mark_cancelable(struct io_uring_cmd *cmd,
> struct io_kiocb *req = cmd_to_io_kiocb(cmd);
> struct io_ring_ctx *ctx = req->ctx;
>
> + /*
> + * Doing cancelations on IOPOLL requests are not supported. Both
> + * because they can't get canceled in the block stack, but also
> + * because iopoll completion data overlaps with the hash_node used
> + * for tracking.
> + */
> + if (ctx->flags & IORING_SETUP_IOPOLL)
> + return;
Maybe better to add warn_on_once(), but not a big deal, anyway:
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Thanks,
Ming
prev parent reply other threads:[~2026-01-15 1:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 15:52 [PATCH] io_uring/uring_cmd: explicitly disallow cancelations for IOPOLL Jens Axboe
2026-01-15 1:44 ` Ming Lei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWhGgQ2XjTrZGjQi@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox