mbox series

[V5,0/2] io_uring: cancelable uring_cmd

Message ID 20230928124327.135679-1-ming.lei@redhat.com (mailing list archive)
Headers show
Series io_uring: cancelable uring_cmd | expand

Message

Ming Lei Sept. 28, 2023, 12:43 p.m. UTC
Hello,

Patch 1 retains top 8bits of  uring_cmd flags for kernel internal use.

Patch 2 implements cancelable uring_cmd.

git tree(with ublk change)

	https://github.com/ming1/linux/commits/uring_exit_and_ublk

V5:
	- return void from io_uring_cmd_mark_cancelable()
	- fix one line comment on IO_URING_F_CANCEL
	- remove one unnecessary warn from io_uring_try_cancel_uring_cmd()
	- all are suggested from Jens

V4:
	- return -EINVAL in case that internal bits are set
	- replace static lock checker with lockdep_assert_held(&ctx->uring_lock);

V3:
	- code style change as suggested by Jens
	- add patch 1

V2:
	- use ->uring_cmd() with IO_URING_F_CANCEL for canceling command


Ming Lei (2):
  io_uring: retain top 8bits of uring_cmd flags for kernel internal use
  io_uring: cancelable uring_cmd

 include/linux/io_uring.h       | 18 +++++++++++++
 include/linux/io_uring_types.h |  6 +++++
 include/uapi/linux/io_uring.h  |  5 ++--
 io_uring/io_uring.c            | 36 +++++++++++++++++++++++++
 io_uring/uring_cmd.c           | 49 +++++++++++++++++++++++++++++++++-
 5 files changed, 110 insertions(+), 4 deletions(-)

Comments

Jens Axboe Sept. 28, 2023, 1:43 p.m. UTC | #1
On 9/28/23 6:43 AM, Ming Lei wrote:
> Hello,
> 
> Patch 1 retains top 8bits of  uring_cmd flags for kernel internal use.
> 
> Patch 2 implements cancelable uring_cmd.

Applied, thanks. Had to hand apply as it doesn't apply to
for-6.7/io_uring due to the waitid addition, but trivial stuff.
Jens Axboe Oct. 3, 2023, 2:05 a.m. UTC | #2
On Thu, 28 Sep 2023 20:43:23 +0800, Ming Lei wrote:
> Patch 1 retains top 8bits of  uring_cmd flags for kernel internal use.
> 
> Patch 2 implements cancelable uring_cmd.
> 
> git tree(with ublk change)
> 
> 	https://github.com/ming1/linux/commits/uring_exit_and_ublk
> 
> [...]

Applied, thanks!

[1/2] io_uring: retain top 8bits of uring_cmd flags for kernel internal use
      commit: 528ce6781726e022bc5dc84034360e6e8f1b89bd
[2/2] io_uring: cancelable uring_cmd
      commit: 93b8cc60c37b9d17732b7a297e5dca29b50a990d

Best regards,