public inbox for [email protected]
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <[email protected]>
To: Ming Lei <[email protected]>
Cc: Jens Axboe <[email protected]>,
	[email protected], [email protected]
Subject: Re: [PATCH V4 2/2] io_uring: cancelable uring_cmd
Date: Mon, 25 Sep 2023 11:55:16 -0400	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]> (Ming Lei's message of "Sat, 23 Sep 2023 10:50:03 +0800")

Ming Lei <[email protected]> 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 <[email protected]>


-- 
Gabriel Krisman Bertazi

  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
     [not found]   ` <CGME20230928061733epcas5p1837b43637213341fb9674e99efa62a94@epcas5p1.samsung.com>
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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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