From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
io-uring@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH V4 2/2] io_uring: cancelable uring_cmd
Date: Mon, 25 Sep 2023 11:55:16 -0400 [thread overview]
Message-ID: <87zg1a5jtn.fsf@suse.de> (raw)
In-Reply-To: <20230923025006.2830689-3-ming.lei@redhat.com> (Ming Lei's message of "Sat, 23 Sep 2023 10:50:03 +0800")
Ming Lei <ming.lei@redhat.com> writes:
> uring_cmd may never complete, such as ublk, in which uring cmd isn't
> completed until one new block request is coming from ublk block device.
>
> Add cancelable uring_cmd to provide mechanism to driver for cancelling
> pending commands in its own way.
>
> Add API of io_uring_cmd_mark_cancelable() for driver to mark one command as
> cancelable, then io_uring will cancel this command in
> io_uring_cancel_generic(). ->uring_cmd() callback is reused for canceling
> command in driver's way, then driver gets notified with the cancelling
> from io_uring.
>
> Add API of io_uring_cmd_get_task() to help driver cancel handler
> deal with the canceling.
I think using ->uring_cmd() with IO_URING_F_CANCEL looks much
nicer. thanks for that.
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
--
Gabriel Krisman Bertazi
next prev parent reply other threads:[~2023-09-25 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 2:50 [PATCH V4 0/2] io_uring: cancelable uring_cmd Ming Lei
2023-09-23 2:50 ` [PATCH V4 1/2] io_uring: retain top 8bits of uring_cmd flags for kernel internal use Ming Lei
2023-09-25 15:58 ` Gabriel Krisman Bertazi
2023-09-28 6:11 ` Anuj Gupta
2023-09-23 2:50 ` [PATCH V4 2/2] io_uring: cancelable uring_cmd Ming Lei
2023-09-25 15:55 ` Gabriel Krisman Bertazi [this message]
2023-09-28 8:38 ` Jens Axboe
2023-09-28 8:55 ` Ming Lei
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=87zg1a5jtn.fsf@suse.de \
--to=krisman@suse.de \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.