Skip to content

Conversation

@jiangliu
Copy link

@jiangliu jiangliu commented Jan 2, 2021

When reading the iou code, I found there are possible bugs and worked out fixes for them.
But I have no io_uring capable systems to trigger and reproduce the bug:(

Replace io_uring_wait_cqes() with the simpler io_uring_wait_cqe_nr().

Signed-off-by: Liu Jiang <[email protected]>
When creating a new IoUring instance, some feature flags needs
additional configuraiton data, such as SQ_AFF needing a cpu id
and ATTACH_WQ needing a reference io_uring fd. An advanced Builder
is needed to support these flags.

Signed-off-by: Liu Jiang <[email protected]>
Safe Wrapping<u32> should be used instead of u32. Also validate the
input parameter `count` for safety.

Signed-off-by: Liu Jiang <[email protected]>
Both HardLinked and SoftLinked provides terminate() method to mark the
end of IO chain, so there may be left over descriptors on the CQEs.
Ensure all possible left over descriptors are consumed when dropping.

Signed-off-by: Liu Jiang <[email protected]>
Ensure all descriptors returned by SQEs are zeroed for safety.

Signed-off-by: Liu Jiang <[email protected]>
Now all allocated event descriptor are zeroed, there's no need to
call pre_nop() for every descriptor any more.

Signed-off-by: Liu Jiang <[email protected]>
Signed-off-by: Liu Jiang <[email protected]>
Signed-off-by: Liu Jiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant