From: Jens Axboe <[email protected]>
To: [email protected]
Subject: [PATCHSET v4 next 0/5] Extend cancelation support
Date: Mon, 18 Apr 2022 10:43:57 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
Hi,
We currently only support looking up and canceling requests based on
the user_data of the original request. Sometimes it can be useful to
instead key off the fd used in the original request, eg if a socket
goes away.
Patch 1 is just a cleanup spotted while doing this, 2 is a prep patch,
patch 3 adds support for IORING_ASYNC_CANCEL_ALL, patch 4 adds support
for IORING_ASYNC_CANCEL_FD, and patch 5 adds support for matching
any request (useful with CANCEL_ALL).
If IORING_ASYNC_CANCEL_ALL is set, all requests matching the given
criteria are canceled. Return value is number of requests canceled,
and 0 if none were found, or any error encountered canceling requests.
If IORING_ASYNC_CANCEL_FD is set, requests matching sqe->fd are
canceled rather than matching on sqe->addr for user_data.
If IORING_ASYNC_CANCEL_ANY is set, all requests are matched vs using
the fd or user_data key.
There's some support in the below liburing branch:
https://git.kernel.dk/cgit/liburing/log/?h=cancel-fd-all
which also has various test cases.
v4:
- Minor cleanups
- Rebase on current tree
- Add IORING_ASYNC_CANCEL_ANY
--
Jens Axboe
next reply other threads:[~2022-04-18 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 16:43 Jens Axboe [this message]
2022-04-18 16:43 ` [PATCH 1/5] io_uring: remove dead 'poll_only' argument to io_poll_cancel() Jens Axboe
2022-04-20 22:37 ` Jens Axboe
2022-04-18 16:43 ` [PATCH 2/5] io_uring: pass in struct io_cancel_data consistently Jens Axboe
2022-04-18 16:44 ` [PATCH 3/5] io_uring: add support for IORING_ASYNC_CANCEL_ALL Jens Axboe
2022-04-18 16:44 ` [PATCH 4/5] io_uring: allow IORING_OP_ASYNC_CANCEL with 'fd' key Jens Axboe
2022-04-18 16:44 ` [PATCH 5/5] io_uring: add support for IORING_ASYNC_CANCEL_ANY Jens Axboe
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] \
/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