Skip to content

Seeking example of applying io_uring_prep_cancel properly #565

Answered by axboe
tofes asked this question in Q&A
Discussion options

You must be logged in to vote

Those sound like expected results - you get -EALREADY since it was already in progress, and the original request errors with -EINTR because it was interrupted.

A note/observation, the Cancel operation and the original operation being cancelled use the same user_data, so when looking at the CQE it's not clear which CQE is for which SQE. Maybe there is a way to differentiate them? I can tell them apart this time using the errno.

Well, you're the one that picked user_data for the cancelation request, so just pick a different value?

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@tofes
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tofes
Comment options

Comment options

You must be logged in to vote
1 reply
@tofes
Comment options

Comment options

You must be logged in to vote
5 replies
@tofes
Comment options

@axboe
Comment options

@ioquatix
Comment options

@axboe
Comment options

@axboe
Comment options

Answer selected by tofes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants