Revert "engines/io_uring: update getevents max to reflect previously seen events"
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 17 Jul 2025 16:56:26 +0000 (10:56 -0600)
committerCaleb Sander Mateos <csander@purestorage.com>
Thu, 17 Jul 2025 17:02:54 +0000 (11:02 -0600)
commit645d43a545d2108bbe3ee2e66aab750a3e2bc513
tree6aa9ec71beceb24dcb6fc5343d502e9ec3dbe45e
parent34fa726e0ae0236c36fb1409bddeab2bab7839d2
Revert "engines/io_uring: update getevents max to reflect previously seen events"

This reverts commit ae8646a1e5848994c4f4511aa190178958309c92.

fio_ioring_cqring_reap() returns up to max - events CQEs. However, the
return value of fio_ioring_cqring_reap() is used to both add to events
and subtract from max. This means that if less than min CQEs are
available and the CQ needs to be polled again, max is effectively
lowered by the number of CQEs that were available. Adding to events is
sufficient to ensure the next call to fio_ioring_cqring_reap() will only
return the remaining CQEs. Commit ae8646a1e584 ("engines/io_uring:
update getevents max to reflect previously seen events") added an
incorrect subtraction from max as well, so revert it.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Fixes: ae8646a1e584 ("engines/io_uring: update getevents max to reflect previously seen events")
engines/io_uring.c