--- libev/ev_iouring.c 2019/12/28 05:20:17 1.14 +++ libev/ev_iouring.c 2019/12/28 05:53:48 1.15 @@ -268,6 +268,7 @@ /* unfortunately, we can't handle this at the moment */ if (res < 0 && errno == EBUSY) + /* the sane thing might be to resize, but we can't */ //TODO ev_syserr ("(libev) io_uring_enter could not clear sq"); else @@ -440,7 +441,8 @@ * be removed. Since we don't *really* have that, we pass in the old * generation counter - if that fails, too bad, it will hopefully be removed * at close time and then be ignored. */ - sqe->user_data = (uint32_t)fd | ((__u64)(uint32_t)anfds [fd].egen << 32); + sqe->addr = (uint32_t)fd | ((__u64)(uint32_t)anfds [fd].egen << 32); + sqe->user_data = (uint64_t)-1; iouring_sqe_submit (EV_A_ sqe); /* increment generation counter to avoid handling old events */ @@ -491,6 +493,10 @@ uint32_t gen = cqe->user_data >> 32; int res = cqe->res; + /* user_data -1 is a remove that we are not atm. interested in */ + if (cqe->user_data == (uint64_t)-1) + return; + assert (("libev: io_uring fd must be in-bounds", fd >= 0 && fd < anfdmax)); /* documentation lies, of course. the result value is NOT like