Prepares operation that cancels existing async work.
This works with any read/write request, accept,send/recvmsg, etc. There’s an important
distinction to make here with the different kinds of commands. A read/write on a regular file
will generally be waiting for IO completion in an uninterruptible state. This means it’ll ignore
any signals or attempts to cancel it, as these operations are uncancellable. io_uring can cancel
these operations if they haven’t yet been started. If they have been started, cancellations on
these will fail. Network IO will generally be waiting interruptibly, and can hence be cancelled
at any time. The completion event for this request will have a result of 0 if done successfully,
-EALREADY if the operation is already in progress, and -ENOENT if the original request
specified cannot be found. For cancellation requests that return -EALREADY, io_uring may or may
not cause this request to be stopped sooner. For blocking IO, the original request will complete
as it originally would have. For IO that is cancellable, it will terminate sooner if at all
possible.
Prepares operation that cancels existing async work.
This works with any read/write request, accept,send/recvmsg, etc. There’s an important distinction to make here with the different kinds of commands. A read/write on a regular file will generally be waiting for IO completion in an uninterruptible state. This means it’ll ignore any signals or attempts to cancel it, as these operations are uncancellable. io_uring can cancel these operations if they haven’t yet been started. If they have been started, cancellations on these will fail. Network IO will generally be waiting interruptibly, and can hence be cancelled at any time. The completion event for this request will have a result of 0 if done successfully, -EALREADY if the operation is already in progress, and -ENOENT if the original request specified cannot be found. For cancellation requests that return -EALREADY, io_uring may or may not cause this request to be stopped sooner. For blocking IO, the original request will complete as it originally would have. For IO that is cancellable, it will terminate sooner if at all possible.