axboe / liburing

Library providing helpers for the Linux kernel io_uring support
MIT License
2.72k stars 393 forks source link

A bit misleading documentation for IORING_OP_POLL_REMOVE or confusing (wrong?) implemetation of io_uring_prep_poll_update() #1095

Closed vsolontsov-ll closed 3 months ago

vsolontsov-ll commented 4 months ago

Looking at the IORING_OP_POLL_REMOVE operation description in the man io_uring_enter, I don't see it can modify the existing polling (unlike the IORING_OP_POLL_ADD) while io_uring_prep_poll_update() uses the IORING_OP_POLL_REMOVE one.

Could you please advise whether io_uring_prep_poll_update() is correct? If so, would be great to clarify the description of IORING_OP_POLL_REMOVE.

isilence commented 4 months ago

The implementation is right, IORING_OP_POLL_REMOVE does updates, so if man says otherwise it is in the wrong. Thanks for letting us know

krisman commented 3 months ago

https://lore.kernel.org/io-uring/20240403164413.16398-2-krisman@suse.de/T/#u