liburing
liburing copied to clipboard
About the issue with using IORING_OP_LINK_TIMEOUT
I'm writing a timeout read method using io_uring_prep_read + io_uring_prep_link_timeout, and the method is now functional. However, there's an issue:
The read CQE->res sometimes returns -ECANCELED due to the timeout, and I treat this as "no data was read." But in reality, this leads to data loss. I suspect that it might have already read some data, but the actual number of bytes read is replaced by -ECANCELED.
If this is the case, how can I solve this problem? Or, even if the operation is canceled, is there a way to still retrieve the number of bytes that were already read?