Let's disable IORING_POLL_ADD_MULTI to workaround an issue
with false-positive POLLIN events in CQ.
In my local setup I managed to fix an issue without this
by making terminal FDs non-blocking, but during full
testsuite execution in Jenkins it was found that issue
still persists. So, let's add this ugly workaround too.
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
io_uring_prep_poll_add(sqe, handler->fd, EPOLLIN);
+ /*
+ * FIXME: workaround an issue with false-positive
+ * io_uring POLL events when multishot mode is enabled.
+ *
+ * It's safe to override oneshot argument here, execution
+ * will go to the same codepath as if kernel lacks IORING_POLL_ADD_MULTI
+ * mode support.
+ */
+ oneshot = true;
+
/*
* Raise IORING_POLL_ADD_MULTI to set up a multishot poll. The same sqe
* will now produce multiple cqes. A cqe produced from a multishot sqe