Skip to content
Snippets Groups Projects
Commit 6c1fd077 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'fix-link-future-test' into 'master'

[IO] document and adjust tests to changes in io_uring's broken link handling

Closes #20

See merge request !212
parents bc752ba5 571ae76c
No related branches found
No related tags found
1 merge request!212[IO] document and adjust tests to changes in io_uring's broken link handling
Pipeline #65388 passed
......@@ -133,13 +133,18 @@ void IoContext::submit(Future &future) {
// Because we submit every Future right away multiple prepared sqes can only
// occur for Future chains.
// If we could not submit the whole chain cancel all non submitted Futures
// because we can not guaranty the soundness of the chain and invalidate their
// prepared sqe
// because we can not guaranty the soundness of the chain have to invalidate
// non submitted but prepared sqes
// req1 -> invalid_req -> req3
// will submit only 2 instead of all 3 prepared sqes leaving a sqe for req3
// in the SQ but unsubmitted
// See: https://github.com/axboe/liburing/issues/186
// https://github.com/axboe/liburing/issues/92
//
// Since kernel commit cf10960426515 io_uring does no longer submit parts of a
// broken chains. This means that all sqes in a chain except the broken one will
// result in cqes with result -ECANCELD and the invalid one will
// generate a cqe with the appropriate error code
if (unlikely(static_cast<unsigned>(submitted) < prepared)) {
unsigned unsubmitted = io_uring_sq_ready(&ring);
Future *unsubmittedFuture = &future;
......
......@@ -119,7 +119,10 @@ static void failureChainCorInvCor() {
assert(res == -EBADF);
res = correctFuture1.wait();
assert(res == (int32_t)buf.size());
// Since the kernel commit cf10960426515 io_uring does not
// submit broken links and completes any request before a
// invalid one as canceled.
assert(res == -ECANCELED || res == (int32_t)buf.size());
emper::io::closeAndWait(fd);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment