engines/libaio: fix io_getevents min/max events arguments
authorLeah Rumancik <leah.rumancik@gmail.com>
Fri, 7 Apr 2023 20:41:03 +0000 (13:41 -0700)
committerLeah Rumancik <leah.rumancik@gmail.com>
Fri, 7 Apr 2023 20:45:52 +0000 (13:45 -0700)
commita8f6714e91d58f4a2eff4198b9f09c89df75f5cb
tree7be23ca8f7ece39ca15edd417100d8c41c47dca9
parent2d8c2709dc067aabdeab8bc1eea1992d9d802375
engines/libaio: fix io_getevents min/max events arguments

If the io_getevents system call is interrupted, it can succeed while
returning less than the min_nr requested events. If this occurs during
the final reaping of events, libaio will call io_getevents again wtih
the same minimum events argument. Since some of the events have already
been reaped, this results in a hang. To fix this, update the arguments
for io_getevents based on the previously seen events.

Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
engines/libaio.c