summaryrefslogtreecommitdiff
path: root/io_uring/rsrc.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2023-09-28 20:43:25 +0800
committerJens Axboe <axboe@kernel.dk>2023-09-28 07:36:00 -0600
commit93b8cc60c37b9d17732b7a297e5dca29b50a990d (patch)
tree69dc83ff4f33883707fc33fc30ad70cc40638969 /io_uring/rsrc.c
parent528ce6781726e022bc5dc84034360e6e8f1b89bd (diff)
io_uring: cancelable uring_cmd
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. Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Suggested-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.c')
0 files changed, 0 insertions, 0 deletions